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 9ec744f..e2f947c 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; |
@@ -227,7 +233,7 @@ namespace OpenSim.Services.LLLoginService | |||
227 | GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService, | 233 | GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService, |
228 | string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message, | 234 | string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message, |
229 | GridRegion home, IPEndPoint clientIP, string mapTileURL, string profileURL, string openIDURL, string searchURL, string currency, | 235 | GridRegion home, IPEndPoint clientIP, string mapTileURL, string profileURL, string openIDURL, string searchURL, string currency, |
230 | string DSTZone) | 236 | string DSTZone, UUID realID) |
231 | : this() | 237 | : this() |
232 | { | 238 | { |
233 | FillOutInventoryData(invSkel, libService); | 239 | FillOutInventoryData(invSkel, libService); |
@@ -240,6 +246,7 @@ namespace OpenSim.Services.LLLoginService | |||
240 | AgentID = account.PrincipalID; | 246 | AgentID = account.PrincipalID; |
241 | SessionID = aCircuit.SessionID; | 247 | SessionID = aCircuit.SessionID; |
242 | SecureSessionID = aCircuit.SecureSessionID; | 248 | SecureSessionID = aCircuit.SecureSessionID; |
249 | RealID = realID; | ||
243 | Message = message; | 250 | Message = message; |
244 | BuddList = ConvertFriendListItem(friendsList); | 251 | BuddList = ConvertFriendListItem(friendsList); |
245 | StartLocation = where; | 252 | StartLocation = where; |
@@ -375,6 +382,7 @@ namespace OpenSim.Services.LLLoginService | |||
375 | private void FillOutRegionData(GridRegion destination) | 382 | private void FillOutRegionData(GridRegion destination) |
376 | { | 383 | { |
377 | IPEndPoint endPoint = destination.ExternalEndPoint; | 384 | IPEndPoint endPoint = destination.ExternalEndPoint; |
385 | if (endPoint == null) return; | ||
378 | SimAddress = endPoint.Address.ToString(); | 386 | SimAddress = endPoint.Address.ToString(); |
379 | SimPort = (uint)endPoint.Port; | 387 | SimPort = (uint)endPoint.Port; |
380 | RegionX = (uint)destination.RegionLocX; | 388 | RegionX = (uint)destination.RegionLocX; |
@@ -450,6 +458,7 @@ namespace OpenSim.Services.LLLoginService | |||
450 | SessionID = UUID.Random(); | 458 | SessionID = UUID.Random(); |
451 | SecureSessionID = UUID.Random(); | 459 | SecureSessionID = UUID.Random(); |
452 | AgentID = UUID.Random(); | 460 | AgentID = UUID.Random(); |
461 | RealID = UUID.Zero; | ||
453 | 462 | ||
454 | Hashtable InitialOutfitHash = new Hashtable(); | 463 | Hashtable InitialOutfitHash = new Hashtable(); |
455 | InitialOutfitHash["folder_name"] = "Nightclub Female"; | 464 | InitialOutfitHash["folder_name"] = "Nightclub Female"; |
@@ -493,6 +502,7 @@ namespace OpenSim.Services.LLLoginService | |||
493 | responseData["http_port"] = (Int32)SimHttpPort; | 502 | responseData["http_port"] = (Int32)SimHttpPort; |
494 | 503 | ||
495 | responseData["agent_id"] = AgentID.ToString(); | 504 | responseData["agent_id"] = AgentID.ToString(); |
505 | responseData["real_id"] = RealID.ToString(); | ||
496 | responseData["session_id"] = SessionID.ToString(); | 506 | responseData["session_id"] = SessionID.ToString(); |
497 | responseData["secure_session_id"] = SecureSessionID.ToString(); | 507 | responseData["secure_session_id"] = SecureSessionID.ToString(); |
498 | responseData["circuit_code"] = CircuitCode; | 508 | responseData["circuit_code"] = CircuitCode; |
@@ -575,6 +585,7 @@ namespace OpenSim.Services.LLLoginService | |||
575 | map["sim_ip"] = OSD.FromString(SimAddress); | 585 | map["sim_ip"] = OSD.FromString(SimAddress); |
576 | 586 | ||
577 | map["agent_id"] = OSD.FromUUID(AgentID); | 587 | map["agent_id"] = OSD.FromUUID(AgentID); |
588 | map["real_id"] = OSD.FromUUID(RealID); | ||
578 | map["session_id"] = OSD.FromUUID(SessionID); | 589 | map["session_id"] = OSD.FromUUID(SessionID); |
579 | map["secure_session_id"] = OSD.FromUUID(SecureSessionID); | 590 | map["secure_session_id"] = OSD.FromUUID(SecureSessionID); |
580 | map["circuit_code"] = OSD.FromInteger(CircuitCode); | 591 | map["circuit_code"] = OSD.FromInteger(CircuitCode); |
@@ -882,6 +893,12 @@ namespace OpenSim.Services.LLLoginService | |||
882 | set { secureSessionID = value; } | 893 | set { secureSessionID = value; } |
883 | } | 894 | } |
884 | 895 | ||
896 | public UUID RealID | ||
897 | { | ||
898 | get { return realID; } | ||
899 | set { realID = value; } | ||
900 | } | ||
901 | |||
885 | public Int32 CircuitCode | 902 | public Int32 CircuitCode |
886 | { | 903 | { |
887 | get { return circuitCode; } | 904 | get { return circuitCode; } |
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 0fbd090..67f26c8 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -140,7 +140,8 @@ namespace OpenSim.Services.LLLoginService | |||
140 | Object[] args = new Object[] { config }; | 140 | Object[] args = new Object[] { config }; |
141 | m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args); | 141 | m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args); |
142 | m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args); | 142 | m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args); |
143 | m_AuthenticationService = ServerUtils.LoadPlugin<IAuthenticationService>(authService, args); | 143 | Object[] authArgs = new Object[] { config, m_UserAccountService }; |
144 | m_AuthenticationService = ServerUtils.LoadPlugin<IAuthenticationService>(authService, authArgs); | ||
144 | m_InventoryService = ServerUtils.LoadPlugin<IInventoryService>(invService, args); | 145 | m_InventoryService = ServerUtils.LoadPlugin<IInventoryService>(invService, args); |
145 | 146 | ||
146 | if (gridService != string.Empty) | 147 | if (gridService != string.Empty) |
@@ -289,6 +290,12 @@ namespace OpenSim.Services.LLLoginService | |||
289 | return LLFailedLoginResponse.UserProblem; | 290 | return LLFailedLoginResponse.UserProblem; |
290 | } | 291 | } |
291 | 292 | ||
293 | if (account.UserLevel < 0) | ||
294 | { | ||
295 | m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: Unverified account"); | ||
296 | return LLFailedLoginResponse.UnverifiedAccountProblem; | ||
297 | } | ||
298 | |||
292 | if (account.UserLevel < m_MinLoginLevel) | 299 | if (account.UserLevel < m_MinLoginLevel) |
293 | { | 300 | { |
294 | m_log.InfoFormat( | 301 | m_log.InfoFormat( |
@@ -320,7 +327,8 @@ namespace OpenSim.Services.LLLoginService | |||
320 | if (!passwd.StartsWith("$1$")) | 327 | if (!passwd.StartsWith("$1$")) |
321 | passwd = "$1$" + Util.Md5Hash(passwd); | 328 | passwd = "$1$" + Util.Md5Hash(passwd); |
322 | passwd = passwd.Remove(0, 3); //remove $1$ | 329 | passwd = passwd.Remove(0, 3); //remove $1$ |
323 | string token = m_AuthenticationService.Authenticate(account.PrincipalID, passwd, 30); | 330 | UUID realID; |
331 | string token = m_AuthenticationService.Authenticate(account.PrincipalID, passwd, 30, out realID); | ||
324 | UUID secureSession = UUID.Zero; | 332 | UUID secureSession = UUID.Zero; |
325 | if ((token == string.Empty) || (token != string.Empty && !UUID.TryParse(token, out secureSession))) | 333 | if ((token == string.Empty) || (token != string.Empty && !UUID.TryParse(token, out secureSession))) |
326 | { | 334 | { |
@@ -452,7 +460,7 @@ namespace OpenSim.Services.LLLoginService | |||
452 | = new LLLoginResponse( | 460 | = new LLLoginResponse( |
453 | account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, | 461 | account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, |
454 | where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, | 462 | where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, |
455 | m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency, m_DSTZone); | 463 | m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency, m_DSTZone, realID); |
456 | 464 | ||
457 | m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName); | 465 | m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName); |
458 | 466 | ||