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 5256b74..f641955 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; |
@@ -457,6 +465,7 @@ namespace OpenSim.Services.LLLoginService | |||
457 | SessionID = UUID.Random(); | 465 | SessionID = UUID.Random(); |
458 | SecureSessionID = UUID.Random(); | 466 | SecureSessionID = UUID.Random(); |
459 | AgentID = UUID.Random(); | 467 | AgentID = UUID.Random(); |
468 | RealID = UUID.Zero; | ||
460 | 469 | ||
461 | Hashtable InitialOutfitHash = new Hashtable(); | 470 | Hashtable InitialOutfitHash = new Hashtable(); |
462 | InitialOutfitHash["folder_name"] = "Nightclub Female"; | 471 | InitialOutfitHash["folder_name"] = "Nightclub Female"; |
@@ -501,6 +510,7 @@ namespace OpenSim.Services.LLLoginService | |||
501 | responseData["http_port"] = (Int32)SimHttpPort; | 510 | responseData["http_port"] = (Int32)SimHttpPort; |
502 | 511 | ||
503 | responseData["agent_id"] = AgentID.ToString(); | 512 | responseData["agent_id"] = AgentID.ToString(); |
513 | responseData["real_id"] = RealID.ToString(); | ||
504 | responseData["session_id"] = SessionID.ToString(); | 514 | responseData["session_id"] = SessionID.ToString(); |
505 | responseData["secure_session_id"] = SecureSessionID.ToString(); | 515 | responseData["secure_session_id"] = SecureSessionID.ToString(); |
506 | responseData["circuit_code"] = CircuitCode; | 516 | responseData["circuit_code"] = CircuitCode; |
@@ -595,6 +605,7 @@ namespace OpenSim.Services.LLLoginService | |||
595 | map["sim_ip"] = OSD.FromString(SimAddress); | 605 | map["sim_ip"] = OSD.FromString(SimAddress); |
596 | 606 | ||
597 | map["agent_id"] = OSD.FromUUID(AgentID); | 607 | map["agent_id"] = OSD.FromUUID(AgentID); |
608 | map["real_id"] = OSD.FromUUID(RealID); | ||
598 | map["session_id"] = OSD.FromUUID(SessionID); | 609 | map["session_id"] = OSD.FromUUID(SessionID); |
599 | map["secure_session_id"] = OSD.FromUUID(SecureSessionID); | 610 | map["secure_session_id"] = OSD.FromUUID(SecureSessionID); |
600 | map["circuit_code"] = OSD.FromInteger(CircuitCode); | 611 | map["circuit_code"] = OSD.FromInteger(CircuitCode); |
@@ -905,6 +916,12 @@ namespace OpenSim.Services.LLLoginService | |||
905 | set { secureSessionID = value; } | 916 | set { secureSessionID = value; } |
906 | } | 917 | } |
907 | 918 | ||
919 | public UUID RealID | ||
920 | { | ||
921 | get { return realID; } | ||
922 | set { realID = value; } | ||
923 | } | ||
924 | |||
908 | public Int32 CircuitCode | 925 | public Int32 CircuitCode |
909 | { | 926 | { |
910 | get { return circuitCode; } | 927 | get { return circuitCode; } |
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index e2f9966..ed62c43 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -149,7 +149,8 @@ namespace OpenSim.Services.LLLoginService | |||
149 | Object[] args = new Object[] { config }; | 149 | Object[] args = new Object[] { config }; |
150 | m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args); | 150 | m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args); |
151 | m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args); | 151 | m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args); |
152 | m_AuthenticationService = ServerUtils.LoadPlugin<IAuthenticationService>(authService, args); | 152 | Object[] authArgs = new Object[] { config, m_UserAccountService }; |
153 | m_AuthenticationService = ServerUtils.LoadPlugin<IAuthenticationService>(authService, authArgs); | ||
153 | m_InventoryService = ServerUtils.LoadPlugin<IInventoryService>(invService, args); | 154 | m_InventoryService = ServerUtils.LoadPlugin<IInventoryService>(invService, args); |
154 | 155 | ||
155 | if (gridService != string.Empty) | 156 | if (gridService != string.Empty) |
@@ -298,6 +299,12 @@ namespace OpenSim.Services.LLLoginService | |||
298 | return LLFailedLoginResponse.UserProblem; | 299 | return LLFailedLoginResponse.UserProblem; |
299 | } | 300 | } |
300 | 301 | ||
302 | if (account.UserLevel < 0) | ||
303 | { | ||
304 | m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: Unverified account"); | ||
305 | return LLFailedLoginResponse.UnverifiedAccountProblem; | ||
306 | } | ||
307 | |||
301 | if (account.UserLevel < m_MinLoginLevel) | 308 | if (account.UserLevel < m_MinLoginLevel) |
302 | { | 309 | { |
303 | m_log.InfoFormat( | 310 | m_log.InfoFormat( |
@@ -329,7 +336,8 @@ namespace OpenSim.Services.LLLoginService | |||
329 | if (!passwd.StartsWith("$1$")) | 336 | if (!passwd.StartsWith("$1$")) |
330 | passwd = "$1$" + Util.Md5Hash(passwd); | 337 | passwd = "$1$" + Util.Md5Hash(passwd); |
331 | passwd = passwd.Remove(0, 3); //remove $1$ | 338 | passwd = passwd.Remove(0, 3); //remove $1$ |
332 | string token = m_AuthenticationService.Authenticate(account.PrincipalID, passwd, 30); | 339 | UUID realID; |
340 | string token = m_AuthenticationService.Authenticate(account.PrincipalID, passwd, 30, out realID); | ||
333 | UUID secureSession = UUID.Zero; | 341 | UUID secureSession = UUID.Zero; |
334 | if ((token == string.Empty) || (token != string.Empty && !UUID.TryParse(token, out secureSession))) | 342 | if ((token == string.Empty) || (token != string.Empty && !UUID.TryParse(token, out secureSession))) |
335 | { | 343 | { |
@@ -463,7 +471,7 @@ namespace OpenSim.Services.LLLoginService | |||
463 | account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, | 471 | account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, |
464 | where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, | 472 | where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, |
465 | m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency, m_DSTZone, | 473 | m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency, m_DSTZone, |
466 | m_DestinationGuide, m_AvatarPicker, m_ClassifiedFee); | 474 | m_DestinationGuide, m_AvatarPicker, realID, m_ClassifiedFee); |
467 | 475 | ||
468 | m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName); | 476 | m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName); |
469 | 477 | ||