diff options
author | UbitUmarov | 2015-09-01 14:54:35 +0100 |
---|---|---|
committer | UbitUmarov | 2015-09-01 14:54:35 +0100 |
commit | 371c9dd2af01a2e7422ec901ee1f80757284a78c (patch) | |
tree | 058d2a513cacb12efcce0c0df0ae14ad135dbfe2 /OpenSim/Services/LLLoginService | |
parent | remove lixo (diff) | |
parent | dont change camera on crossings (diff) | |
download | opensim-SC_OLD-371c9dd2af01a2e7422ec901ee1f80757284a78c.zip opensim-SC_OLD-371c9dd2af01a2e7422ec901ee1f80757284a78c.tar.gz opensim-SC_OLD-371c9dd2af01a2e7422ec901ee1f80757284a78c.tar.bz2 opensim-SC_OLD-371c9dd2af01a2e7422ec901ee1f80757284a78c.tar.xz |
bad merge?
Diffstat (limited to 'OpenSim/Services/LLLoginService')
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginResponse.cs | 22 | ||||
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginService.cs | 32 |
2 files changed, 49 insertions, 5 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs index c3756d0..92d93ee 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,8 +234,13 @@ namespace OpenSim.Services.LLLoginService | |||
228 | public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo, | 234 | public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo, |
229 | GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService, | 235 | GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService, |
230 | string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message, | 236 | string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message, |
237 | <<<<<<< HEAD | ||
231 | GridRegion home, IPEndPoint clientIP, string mapTileURL, string searchURL, string currency, | 238 | GridRegion home, IPEndPoint clientIP, string mapTileURL, string searchURL, string currency, |
232 | string DSTZone, string destinationsURL, string avatarsURL, string classifiedFee, int maxAgentGroups) | 239 | string DSTZone, string destinationsURL, string avatarsURL, string classifiedFee, int maxAgentGroups) |
240 | ======= | ||
241 | GridRegion home, IPEndPoint clientIP, string mapTileURL, string profileURL, string openIDURL, string searchURL, string currency, | ||
242 | string DSTZone, string destinationsURL, string avatarsURL, UUID realID, string classifiedFee) | ||
243 | >>>>>>> avn/ubitvar | ||
233 | : this() | 244 | : this() |
234 | { | 245 | { |
235 | FillOutInventoryData(invSkel, libService); | 246 | FillOutInventoryData(invSkel, libService); |
@@ -242,6 +253,7 @@ namespace OpenSim.Services.LLLoginService | |||
242 | AgentID = account.PrincipalID; | 253 | AgentID = account.PrincipalID; |
243 | SessionID = aCircuit.SessionID; | 254 | SessionID = aCircuit.SessionID; |
244 | SecureSessionID = aCircuit.SecureSessionID; | 255 | SecureSessionID = aCircuit.SecureSessionID; |
256 | RealID = realID; | ||
245 | Message = message; | 257 | Message = message; |
246 | BuddList = ConvertFriendListItem(friendsList); | 258 | BuddList = ConvertFriendListItem(friendsList); |
247 | StartLocation = where; | 259 | StartLocation = where; |
@@ -383,6 +395,7 @@ namespace OpenSim.Services.LLLoginService | |||
383 | private void FillOutRegionData(GridRegion destination) | 395 | private void FillOutRegionData(GridRegion destination) |
384 | { | 396 | { |
385 | IPEndPoint endPoint = destination.ExternalEndPoint; | 397 | IPEndPoint endPoint = destination.ExternalEndPoint; |
398 | if (endPoint == null) return; | ||
386 | SimAddress = endPoint.Address.ToString(); | 399 | SimAddress = endPoint.Address.ToString(); |
387 | SimPort = (uint)endPoint.Port; | 400 | SimPort = (uint)endPoint.Port; |
388 | RegionX = (uint)destination.RegionLocX; | 401 | RegionX = (uint)destination.RegionLocX; |
@@ -473,6 +486,7 @@ namespace OpenSim.Services.LLLoginService | |||
473 | SessionID = UUID.Random(); | 486 | SessionID = UUID.Random(); |
474 | SecureSessionID = UUID.Random(); | 487 | SecureSessionID = UUID.Random(); |
475 | AgentID = UUID.Random(); | 488 | AgentID = UUID.Random(); |
489 | RealID = UUID.Zero; | ||
476 | 490 | ||
477 | Hashtable InitialOutfitHash = new Hashtable(); | 491 | Hashtable InitialOutfitHash = new Hashtable(); |
478 | InitialOutfitHash["folder_name"] = "Nightclub Female"; | 492 | InitialOutfitHash["folder_name"] = "Nightclub Female"; |
@@ -518,6 +532,7 @@ namespace OpenSim.Services.LLLoginService | |||
518 | responseData["http_port"] = (Int32)SimHttpPort; | 532 | responseData["http_port"] = (Int32)SimHttpPort; |
519 | 533 | ||
520 | responseData["agent_id"] = AgentID.ToString(); | 534 | responseData["agent_id"] = AgentID.ToString(); |
535 | responseData["real_id"] = RealID.ToString(); | ||
521 | responseData["session_id"] = SessionID.ToString(); | 536 | responseData["session_id"] = SessionID.ToString(); |
522 | responseData["secure_session_id"] = SecureSessionID.ToString(); | 537 | responseData["secure_session_id"] = SecureSessionID.ToString(); |
523 | responseData["circuit_code"] = CircuitCode; | 538 | responseData["circuit_code"] = CircuitCode; |
@@ -613,6 +628,7 @@ namespace OpenSim.Services.LLLoginService | |||
613 | map["sim_ip"] = OSD.FromString(SimAddress); | 628 | map["sim_ip"] = OSD.FromString(SimAddress); |
614 | 629 | ||
615 | map["agent_id"] = OSD.FromUUID(AgentID); | 630 | map["agent_id"] = OSD.FromUUID(AgentID); |
631 | map["real_id"] = OSD.FromUUID(RealID); | ||
616 | map["session_id"] = OSD.FromUUID(SessionID); | 632 | map["session_id"] = OSD.FromUUID(SessionID); |
617 | map["secure_session_id"] = OSD.FromUUID(SecureSessionID); | 633 | map["secure_session_id"] = OSD.FromUUID(SecureSessionID); |
618 | map["circuit_code"] = OSD.FromInteger(CircuitCode); | 634 | map["circuit_code"] = OSD.FromInteger(CircuitCode); |
@@ -924,6 +940,12 @@ namespace OpenSim.Services.LLLoginService | |||
924 | set { secureSessionID = value; } | 940 | set { secureSessionID = value; } |
925 | } | 941 | } |
926 | 942 | ||
943 | public UUID RealID | ||
944 | { | ||
945 | get { return realID; } | ||
946 | set { realID = value; } | ||
947 | } | ||
948 | |||
927 | public Int32 CircuitCode | 949 | public Int32 CircuitCode |
928 | { | 950 | { |
929 | get { return circuitCode; } | 951 | get { return circuitCode; } |
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index d67bc4d..ba69e95 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -151,7 +151,8 @@ namespace OpenSim.Services.LLLoginService | |||
151 | Object[] args = new Object[] { config }; | 151 | Object[] args = new Object[] { config }; |
152 | m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args); | 152 | m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args); |
153 | m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args); | 153 | m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args); |
154 | m_AuthenticationService = ServerUtils.LoadPlugin<IAuthenticationService>(authService, args); | 154 | Object[] authArgs = new Object[] { config, m_UserAccountService }; |
155 | m_AuthenticationService = ServerUtils.LoadPlugin<IAuthenticationService>(authService, authArgs); | ||
155 | m_InventoryService = ServerUtils.LoadPlugin<IInventoryService>(invService, args); | 156 | m_InventoryService = ServerUtils.LoadPlugin<IInventoryService>(invService, args); |
156 | 157 | ||
157 | if (gridService != string.Empty) | 158 | if (gridService != string.Empty) |
@@ -257,14 +258,20 @@ namespace OpenSim.Services.LLLoginService | |||
257 | } | 258 | } |
258 | 259 | ||
259 | public LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, | 260 | public LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, |
260 | string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP) | 261 | string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP, bool LibOMVclient) |
261 | { | 262 | { |
262 | bool success = false; | 263 | bool success = false; |
263 | UUID session = UUID.Random(); | 264 | UUID session = UUID.Random(); |
265 | <<<<<<< HEAD | ||
264 | string processedMessage; | 266 | string processedMessage; |
267 | ======= | ||
268 | if (clientVersion.Contains("Radegast")) | ||
269 | LibOMVclient = false; | ||
270 | >>>>>>> avn/ubitvar | ||
265 | 271 | ||
266 | m_log.InfoFormat("[LLOGIN SERVICE]: Login request for {0} {1} at {2} using viewer {3}, channel {4}, IP {5}, Mac {6}, Id0 {7}", | 272 | |
267 | firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0); | 273 | m_log.InfoFormat("[LLOGIN SERVICE]: Login request for {0} {1} at {2} using viewer {3}, channel {4}, IP {5}, Mac {6}, Id0 {7}, Possible LibOMVGridProxy: {8} ", |
274 | firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0, LibOMVclient.ToString()); | ||
268 | 275 | ||
269 | try | 276 | try |
270 | { | 277 | { |
@@ -310,6 +317,12 @@ namespace OpenSim.Services.LLLoginService | |||
310 | return LLFailedLoginResponse.UserProblem; | 317 | return LLFailedLoginResponse.UserProblem; |
311 | } | 318 | } |
312 | 319 | ||
320 | if (account.UserLevel < 0) | ||
321 | { | ||
322 | m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: Unverified account"); | ||
323 | return LLFailedLoginResponse.UnverifiedAccountProblem; | ||
324 | } | ||
325 | |||
313 | if (account.UserLevel < m_MinLoginLevel) | 326 | if (account.UserLevel < m_MinLoginLevel) |
314 | { | 327 | { |
315 | m_log.InfoFormat( | 328 | m_log.InfoFormat( |
@@ -341,7 +354,8 @@ namespace OpenSim.Services.LLLoginService | |||
341 | if (!passwd.StartsWith("$1$")) | 354 | if (!passwd.StartsWith("$1$")) |
342 | passwd = "$1$" + Util.Md5Hash(passwd); | 355 | passwd = "$1$" + Util.Md5Hash(passwd); |
343 | passwd = passwd.Remove(0, 3); //remove $1$ | 356 | passwd = passwd.Remove(0, 3); //remove $1$ |
344 | string token = m_AuthenticationService.Authenticate(account.PrincipalID, passwd, 30); | 357 | UUID realID; |
358 | string token = m_AuthenticationService.Authenticate(account.PrincipalID, passwd, 30, out realID); | ||
345 | UUID secureSession = UUID.Zero; | 359 | UUID secureSession = UUID.Zero; |
346 | if ((token == string.Empty) || (token != string.Empty && !UUID.TryParse(token, out secureSession))) | 360 | if ((token == string.Empty) || (token != string.Empty && !UUID.TryParse(token, out secureSession))) |
347 | { | 361 | { |
@@ -508,11 +522,19 @@ namespace OpenSim.Services.LLLoginService | |||
508 | processedMessage = processedMessage.Replace("\\n", "\n").Replace("<USERNAME>", firstName + " " + lastName); | 522 | processedMessage = processedMessage.Replace("\\n", "\n").Replace("<USERNAME>", firstName + " " + lastName); |
509 | 523 | ||
510 | LLLoginResponse response | 524 | LLLoginResponse response |
525 | <<<<<<< HEAD | ||
511 | = new LLLoginResponse( | 526 | = new LLLoginResponse( |
512 | account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, | 527 | account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, |
513 | where, startLocation, position, lookAt, gestures, processedMessage, home, clientIP, | 528 | where, startLocation, position, lookAt, gestures, processedMessage, home, clientIP, |
514 | m_MapTileURL, m_SearchURL, m_Currency, m_DSTZone, | 529 | m_MapTileURL, m_SearchURL, m_Currency, m_DSTZone, |
515 | m_DestinationGuide, m_AvatarPicker, m_ClassifiedFee, m_MaxAgentGroups); | 530 | m_DestinationGuide, m_AvatarPicker, m_ClassifiedFee, m_MaxAgentGroups); |
531 | ======= | ||
532 | = new LLLoginResponse( | ||
533 | account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, | ||
534 | where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, | ||
535 | m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency, m_DSTZone, | ||
536 | m_DestinationGuide, m_AvatarPicker, realID, m_ClassifiedFee); | ||
537 | >>>>>>> avn/ubitvar | ||
516 | 538 | ||
517 | m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName); | 539 | m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName); |
518 | 540 | ||