diff options
Diffstat (limited to 'OpenSim/Services/LLLoginService')
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginResponse.cs | 19 | ||||
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginService.cs | 14 |
2 files changed, 29 insertions, 4 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs index 6ab5258..057c492 100644 --- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs +++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs | |||
@@ -55,6 +55,7 @@ namespace OpenSim.Services.LLLoginService | |||
55 | public static LLFailedLoginResponse InventoryProblem; | 55 | public static LLFailedLoginResponse InventoryProblem; |
56 | public static LLFailedLoginResponse DeadRegionProblem; | 56 | public static LLFailedLoginResponse DeadRegionProblem; |
57 | public static LLFailedLoginResponse LoginBlockedProblem; | 57 | public static LLFailedLoginResponse LoginBlockedProblem; |
58 | public static LLFailedLoginResponse UnverifiedAccountProblem; | ||
58 | public static LLFailedLoginResponse AlreadyLoggedInProblem; | 59 | public static LLFailedLoginResponse AlreadyLoggedInProblem; |
59 | public static LLFailedLoginResponse InternalError; | 60 | public static LLFailedLoginResponse InternalError; |
60 | 61 | ||
@@ -75,6 +76,10 @@ namespace OpenSim.Services.LLLoginService | |||
75 | LoginBlockedProblem = new LLFailedLoginResponse("presence", | 76 | LoginBlockedProblem = new LLFailedLoginResponse("presence", |
76 | "Logins are currently restricted. Please try again later.", | 77 | "Logins are currently restricted. Please try again later.", |
77 | "false"); | 78 | "false"); |
79 | UnverifiedAccountProblem = new LLFailedLoginResponse("presence", | ||
80 | "Your account has not yet been verified. Please check " + | ||
81 | "your email and click the provided link.", | ||
82 | "false"); | ||
78 | AlreadyLoggedInProblem = new LLFailedLoginResponse("presence", | 83 | AlreadyLoggedInProblem = new LLFailedLoginResponse("presence", |
79 | "You appear to be already logged in. " + | 84 | "You appear to be already logged in. " + |
80 | "If this is not the case please wait for your session to timeout. " + | 85 | "If this is not the case please wait for your session to timeout. " + |
@@ -145,6 +150,7 @@ namespace OpenSim.Services.LLLoginService | |||
145 | private UUID agentID; | 150 | private UUID agentID; |
146 | private UUID sessionID; | 151 | private UUID sessionID; |
147 | private UUID secureSessionID; | 152 | private UUID secureSessionID; |
153 | private UUID realID; | ||
148 | 154 | ||
149 | // Login Flags | 155 | // Login Flags |
150 | private string dst; | 156 | private string dst; |
@@ -228,7 +234,7 @@ namespace OpenSim.Services.LLLoginService | |||
228 | GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService, | 234 | GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService, |
229 | string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message, | 235 | string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message, |
230 | GridRegion home, IPEndPoint clientIP, string mapTileURL, string profileURL, string openIDURL, string searchURL, string currency, | 236 | GridRegion home, IPEndPoint clientIP, string mapTileURL, string profileURL, string openIDURL, string searchURL, string currency, |
231 | string DSTZone, string destinationsURL, string avatarsURL, string classifiedFee) | 237 | string DSTZone, string destinationsURL, string avatarsURL, UUID realID, string classifiedFee) |
232 | : this() | 238 | : this() |
233 | { | 239 | { |
234 | FillOutInventoryData(invSkel, libService); | 240 | FillOutInventoryData(invSkel, libService); |
@@ -241,6 +247,7 @@ namespace OpenSim.Services.LLLoginService | |||
241 | AgentID = account.PrincipalID; | 247 | AgentID = account.PrincipalID; |
242 | SessionID = aCircuit.SessionID; | 248 | SessionID = aCircuit.SessionID; |
243 | SecureSessionID = aCircuit.SecureSessionID; | 249 | SecureSessionID = aCircuit.SecureSessionID; |
250 | RealID = realID; | ||
244 | Message = message; | 251 | Message = message; |
245 | BuddList = ConvertFriendListItem(friendsList); | 252 | BuddList = ConvertFriendListItem(friendsList); |
246 | StartLocation = where; | 253 | StartLocation = where; |
@@ -380,6 +387,7 @@ namespace OpenSim.Services.LLLoginService | |||
380 | private void FillOutRegionData(GridRegion destination) | 387 | private void FillOutRegionData(GridRegion destination) |
381 | { | 388 | { |
382 | IPEndPoint endPoint = destination.ExternalEndPoint; | 389 | IPEndPoint endPoint = destination.ExternalEndPoint; |
390 | if (endPoint == null) return; | ||
383 | SimAddress = endPoint.Address.ToString(); | 391 | SimAddress = endPoint.Address.ToString(); |
384 | SimPort = (uint)endPoint.Port; | 392 | SimPort = (uint)endPoint.Port; |
385 | RegionX = (uint)destination.RegionLocX; | 393 | RegionX = (uint)destination.RegionLocX; |
@@ -455,6 +463,7 @@ namespace OpenSim.Services.LLLoginService | |||
455 | SessionID = UUID.Random(); | 463 | SessionID = UUID.Random(); |
456 | SecureSessionID = UUID.Random(); | 464 | SecureSessionID = UUID.Random(); |
457 | AgentID = UUID.Random(); | 465 | AgentID = UUID.Random(); |
466 | RealID = UUID.Zero; | ||
458 | 467 | ||
459 | Hashtable InitialOutfitHash = new Hashtable(); | 468 | Hashtable InitialOutfitHash = new Hashtable(); |
460 | InitialOutfitHash["folder_name"] = "Nightclub Female"; | 469 | InitialOutfitHash["folder_name"] = "Nightclub Female"; |
@@ -499,6 +508,7 @@ namespace OpenSim.Services.LLLoginService | |||
499 | responseData["http_port"] = (Int32)SimHttpPort; | 508 | responseData["http_port"] = (Int32)SimHttpPort; |
500 | 509 | ||
501 | responseData["agent_id"] = AgentID.ToString(); | 510 | responseData["agent_id"] = AgentID.ToString(); |
511 | responseData["real_id"] = RealID.ToString(); | ||
502 | responseData["session_id"] = SessionID.ToString(); | 512 | responseData["session_id"] = SessionID.ToString(); |
503 | responseData["secure_session_id"] = SecureSessionID.ToString(); | 513 | responseData["secure_session_id"] = SecureSessionID.ToString(); |
504 | responseData["circuit_code"] = CircuitCode; | 514 | responseData["circuit_code"] = CircuitCode; |
@@ -590,6 +600,7 @@ namespace OpenSim.Services.LLLoginService | |||
590 | map["sim_ip"] = OSD.FromString(SimAddress); | 600 | map["sim_ip"] = OSD.FromString(SimAddress); |
591 | 601 | ||
592 | map["agent_id"] = OSD.FromUUID(AgentID); | 602 | map["agent_id"] = OSD.FromUUID(AgentID); |
603 | map["real_id"] = OSD.FromUUID(RealID); | ||
593 | map["session_id"] = OSD.FromUUID(SessionID); | 604 | map["session_id"] = OSD.FromUUID(SessionID); |
594 | map["secure_session_id"] = OSD.FromUUID(SecureSessionID); | 605 | map["secure_session_id"] = OSD.FromUUID(SecureSessionID); |
595 | map["circuit_code"] = OSD.FromInteger(CircuitCode); | 606 | map["circuit_code"] = OSD.FromInteger(CircuitCode); |
@@ -900,6 +911,12 @@ namespace OpenSim.Services.LLLoginService | |||
900 | set { secureSessionID = value; } | 911 | set { secureSessionID = value; } |
901 | } | 912 | } |
902 | 913 | ||
914 | public UUID RealID | ||
915 | { | ||
916 | get { return realID; } | ||
917 | set { realID = value; } | ||
918 | } | ||
919 | |||
903 | public Int32 CircuitCode | 920 | public Int32 CircuitCode |
904 | { | 921 | { |
905 | get { return circuitCode; } | 922 | get { return circuitCode; } |
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index fe43582..faf7f71 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -147,7 +147,8 @@ namespace OpenSim.Services.LLLoginService | |||
147 | Object[] args = new Object[] { config }; | 147 | Object[] args = new Object[] { config }; |
148 | m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args); | 148 | m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args); |
149 | m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args); | 149 | m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args); |
150 | m_AuthenticationService = ServerUtils.LoadPlugin<IAuthenticationService>(authService, args); | 150 | Object[] authArgs = new Object[] { config, m_UserAccountService }; |
151 | m_AuthenticationService = ServerUtils.LoadPlugin<IAuthenticationService>(authService, authArgs); | ||
151 | m_InventoryService = ServerUtils.LoadPlugin<IInventoryService>(invService, args); | 152 | m_InventoryService = ServerUtils.LoadPlugin<IInventoryService>(invService, args); |
152 | 153 | ||
153 | if (gridService != string.Empty) | 154 | if (gridService != string.Empty) |
@@ -296,6 +297,12 @@ namespace OpenSim.Services.LLLoginService | |||
296 | return LLFailedLoginResponse.UserProblem; | 297 | return LLFailedLoginResponse.UserProblem; |
297 | } | 298 | } |
298 | 299 | ||
300 | if (account.UserLevel < 0) | ||
301 | { | ||
302 | m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: Unverified account"); | ||
303 | return LLFailedLoginResponse.UnverifiedAccountProblem; | ||
304 | } | ||
305 | |||
299 | if (account.UserLevel < m_MinLoginLevel) | 306 | if (account.UserLevel < m_MinLoginLevel) |
300 | { | 307 | { |
301 | m_log.InfoFormat( | 308 | m_log.InfoFormat( |
@@ -327,7 +334,8 @@ namespace OpenSim.Services.LLLoginService | |||
327 | if (!passwd.StartsWith("$1$")) | 334 | if (!passwd.StartsWith("$1$")) |
328 | passwd = "$1$" + Util.Md5Hash(passwd); | 335 | passwd = "$1$" + Util.Md5Hash(passwd); |
329 | passwd = passwd.Remove(0, 3); //remove $1$ | 336 | passwd = passwd.Remove(0, 3); //remove $1$ |
330 | string token = m_AuthenticationService.Authenticate(account.PrincipalID, passwd, 30); | 337 | UUID realID; |
338 | string token = m_AuthenticationService.Authenticate(account.PrincipalID, passwd, 30, out realID); | ||
331 | UUID secureSession = UUID.Zero; | 339 | UUID secureSession = UUID.Zero; |
332 | if ((token == string.Empty) || (token != string.Empty && !UUID.TryParse(token, out secureSession))) | 340 | if ((token == string.Empty) || (token != string.Empty && !UUID.TryParse(token, out secureSession))) |
333 | { | 341 | { |
@@ -460,7 +468,7 @@ namespace OpenSim.Services.LLLoginService | |||
460 | account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, | 468 | account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, |
461 | where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, | 469 | where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, |
462 | m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency, m_DSTZone, | 470 | m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency, m_DSTZone, |
463 | m_DestinationGuide, m_AvatarPicker, m_ClassifiedFee); | 471 | m_DestinationGuide, m_AvatarPicker, realID, m_ClassifiedFee); |
464 | 472 | ||
465 | m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName); | 473 | m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName); |
466 | 474 | ||