diff options
Diffstat (limited to 'OpenSim/Services/LLLoginService')
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginResponse.cs | 22 | ||||
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginService.cs | 36 |
2 files changed, 46 insertions, 12 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs index c3756d0..0f57c2e 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,9 @@ 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, |
231 | GridRegion home, IPEndPoint clientIP, string mapTileURL, string searchURL, string currency, | 237 | |
232 | string DSTZone, string destinationsURL, string avatarsURL, string classifiedFee, int maxAgentGroups) | 238 | GridRegion home, IPEndPoint clientIP, string mapTileURL, string profileURL, string openIDURL, string searchURL, string currency, |
239 | string DSTZone, string destinationsURL, string avatarsURL, UUID realID, string classifiedFee,int maxAgentGroups) | ||
233 | : this() | 240 | : this() |
234 | { | 241 | { |
235 | FillOutInventoryData(invSkel, libService); | 242 | FillOutInventoryData(invSkel, libService); |
@@ -242,6 +249,7 @@ namespace OpenSim.Services.LLLoginService | |||
242 | AgentID = account.PrincipalID; | 249 | AgentID = account.PrincipalID; |
243 | SessionID = aCircuit.SessionID; | 250 | SessionID = aCircuit.SessionID; |
244 | SecureSessionID = aCircuit.SecureSessionID; | 251 | SecureSessionID = aCircuit.SecureSessionID; |
252 | RealID = realID; | ||
245 | Message = message; | 253 | Message = message; |
246 | BuddList = ConvertFriendListItem(friendsList); | 254 | BuddList = ConvertFriendListItem(friendsList); |
247 | StartLocation = where; | 255 | StartLocation = where; |
@@ -383,6 +391,7 @@ namespace OpenSim.Services.LLLoginService | |||
383 | private void FillOutRegionData(GridRegion destination) | 391 | private void FillOutRegionData(GridRegion destination) |
384 | { | 392 | { |
385 | IPEndPoint endPoint = destination.ExternalEndPoint; | 393 | IPEndPoint endPoint = destination.ExternalEndPoint; |
394 | if (endPoint == null) return; | ||
386 | SimAddress = endPoint.Address.ToString(); | 395 | SimAddress = endPoint.Address.ToString(); |
387 | SimPort = (uint)endPoint.Port; | 396 | SimPort = (uint)endPoint.Port; |
388 | RegionX = (uint)destination.RegionLocX; | 397 | RegionX = (uint)destination.RegionLocX; |
@@ -473,6 +482,7 @@ namespace OpenSim.Services.LLLoginService | |||
473 | SessionID = UUID.Random(); | 482 | SessionID = UUID.Random(); |
474 | SecureSessionID = UUID.Random(); | 483 | SecureSessionID = UUID.Random(); |
475 | AgentID = UUID.Random(); | 484 | AgentID = UUID.Random(); |
485 | RealID = UUID.Zero; | ||
476 | 486 | ||
477 | Hashtable InitialOutfitHash = new Hashtable(); | 487 | Hashtable InitialOutfitHash = new Hashtable(); |
478 | InitialOutfitHash["folder_name"] = "Nightclub Female"; | 488 | InitialOutfitHash["folder_name"] = "Nightclub Female"; |
@@ -518,6 +528,7 @@ namespace OpenSim.Services.LLLoginService | |||
518 | responseData["http_port"] = (Int32)SimHttpPort; | 528 | responseData["http_port"] = (Int32)SimHttpPort; |
519 | 529 | ||
520 | responseData["agent_id"] = AgentID.ToString(); | 530 | responseData["agent_id"] = AgentID.ToString(); |
531 | responseData["real_id"] = RealID.ToString(); | ||
521 | responseData["session_id"] = SessionID.ToString(); | 532 | responseData["session_id"] = SessionID.ToString(); |
522 | responseData["secure_session_id"] = SecureSessionID.ToString(); | 533 | responseData["secure_session_id"] = SecureSessionID.ToString(); |
523 | responseData["circuit_code"] = CircuitCode; | 534 | responseData["circuit_code"] = CircuitCode; |
@@ -613,6 +624,7 @@ namespace OpenSim.Services.LLLoginService | |||
613 | map["sim_ip"] = OSD.FromString(SimAddress); | 624 | map["sim_ip"] = OSD.FromString(SimAddress); |
614 | 625 | ||
615 | map["agent_id"] = OSD.FromUUID(AgentID); | 626 | map["agent_id"] = OSD.FromUUID(AgentID); |
627 | map["real_id"] = OSD.FromUUID(RealID); | ||
616 | map["session_id"] = OSD.FromUUID(SessionID); | 628 | map["session_id"] = OSD.FromUUID(SessionID); |
617 | map["secure_session_id"] = OSD.FromUUID(SecureSessionID); | 629 | map["secure_session_id"] = OSD.FromUUID(SecureSessionID); |
618 | map["circuit_code"] = OSD.FromInteger(CircuitCode); | 630 | map["circuit_code"] = OSD.FromInteger(CircuitCode); |
@@ -924,6 +936,12 @@ namespace OpenSim.Services.LLLoginService | |||
924 | set { secureSessionID = value; } | 936 | set { secureSessionID = value; } |
925 | } | 937 | } |
926 | 938 | ||
939 | public UUID RealID | ||
940 | { | ||
941 | get { return realID; } | ||
942 | set { realID = value; } | ||
943 | } | ||
944 | |||
927 | public Int32 CircuitCode | 945 | public Int32 CircuitCode |
928 | { | 946 | { |
929 | get { return circuitCode; } | 947 | get { return circuitCode; } |
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 10c2e8c..c1b45b2 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -77,6 +77,8 @@ namespace OpenSim.Services.LLLoginService | |||
77 | protected string m_GatekeeperURL; | 77 | protected string m_GatekeeperURL; |
78 | protected bool m_AllowRemoteSetLoginLevel; | 78 | protected bool m_AllowRemoteSetLoginLevel; |
79 | protected string m_MapTileURL; | 79 | protected string m_MapTileURL; |
80 | protected string m_ProfileURL; | ||
81 | protected string m_OpenIDURL; | ||
80 | protected string m_SearchURL; | 82 | protected string m_SearchURL; |
81 | protected string m_Currency; | 83 | protected string m_Currency; |
82 | protected string m_ClassifiedFee; | 84 | protected string m_ClassifiedFee; |
@@ -117,6 +119,8 @@ namespace OpenSim.Services.LLLoginService | |||
117 | m_GatekeeperURL = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI", | 119 | m_GatekeeperURL = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI", |
118 | new string[] { "Startup", "Hypergrid", "LoginService" }, String.Empty); | 120 | new string[] { "Startup", "Hypergrid", "LoginService" }, String.Empty); |
119 | m_MapTileURL = m_LoginServerConfig.GetString("MapTileURL", string.Empty); | 121 | m_MapTileURL = m_LoginServerConfig.GetString("MapTileURL", string.Empty); |
122 | m_ProfileURL = m_LoginServerConfig.GetString("ProfileServerURL", string.Empty); | ||
123 | m_OpenIDURL = m_LoginServerConfig.GetString("OpenIDServerURL", String.Empty); | ||
120 | m_SearchURL = m_LoginServerConfig.GetString("SearchURL", string.Empty); | 124 | m_SearchURL = m_LoginServerConfig.GetString("SearchURL", string.Empty); |
121 | m_Currency = m_LoginServerConfig.GetString("Currency", string.Empty); | 125 | m_Currency = m_LoginServerConfig.GetString("Currency", string.Empty); |
122 | m_ClassifiedFee = m_LoginServerConfig.GetString("ClassifiedFee", string.Empty); | 126 | m_ClassifiedFee = m_LoginServerConfig.GetString("ClassifiedFee", string.Empty); |
@@ -155,7 +159,8 @@ namespace OpenSim.Services.LLLoginService | |||
155 | Object[] args = new Object[] { config }; | 159 | Object[] args = new Object[] { config }; |
156 | m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args); | 160 | m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args); |
157 | m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args); | 161 | m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args); |
158 | m_AuthenticationService = ServerUtils.LoadPlugin<IAuthenticationService>(authService, args); | 162 | Object[] authArgs = new Object[] { config, m_UserAccountService }; |
163 | m_AuthenticationService = ServerUtils.LoadPlugin<IAuthenticationService>(authService, authArgs); | ||
159 | m_InventoryService = ServerUtils.LoadPlugin<IInventoryService>(invService, args); | 164 | m_InventoryService = ServerUtils.LoadPlugin<IInventoryService>(invService, args); |
160 | 165 | ||
161 | if (gridService != string.Empty) | 166 | if (gridService != string.Empty) |
@@ -261,14 +266,18 @@ namespace OpenSim.Services.LLLoginService | |||
261 | } | 266 | } |
262 | 267 | ||
263 | public LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, | 268 | public LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, |
264 | string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP) | 269 | string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP, bool LibOMVclient) |
265 | { | 270 | { |
266 | bool success = false; | 271 | bool success = false; |
267 | UUID session = UUID.Random(); | 272 | UUID session = UUID.Random(); |
273 | |||
268 | string processedMessage; | 274 | string processedMessage; |
269 | 275 | ||
270 | m_log.InfoFormat("[LLOGIN SERVICE]: Login request for {0} {1} at {2} using viewer {3}, channel {4}, IP {5}, Mac {6}, Id0 {7}", | 276 | if (clientVersion.Contains("Radegast")) |
271 | firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0); | 277 | LibOMVclient = false; |
278 | |||
279 | 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} ", | ||
280 | firstName, lastName, startLocation, clientVersion, channel, clientIP.Address.ToString(), mac, id0, LibOMVclient.ToString()); | ||
272 | 281 | ||
273 | try | 282 | try |
274 | { | 283 | { |
@@ -314,6 +323,12 @@ namespace OpenSim.Services.LLLoginService | |||
314 | return LLFailedLoginResponse.UserProblem; | 323 | return LLFailedLoginResponse.UserProblem; |
315 | } | 324 | } |
316 | 325 | ||
326 | if (account.UserLevel < 0) | ||
327 | { | ||
328 | m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: Unverified account"); | ||
329 | return LLFailedLoginResponse.UnverifiedAccountProblem; | ||
330 | } | ||
331 | |||
317 | if (account.UserLevel < m_MinLoginLevel) | 332 | if (account.UserLevel < m_MinLoginLevel) |
318 | { | 333 | { |
319 | m_log.InfoFormat( | 334 | m_log.InfoFormat( |
@@ -345,7 +360,8 @@ namespace OpenSim.Services.LLLoginService | |||
345 | if (!passwd.StartsWith("$1$")) | 360 | if (!passwd.StartsWith("$1$")) |
346 | passwd = "$1$" + Util.Md5Hash(passwd); | 361 | passwd = "$1$" + Util.Md5Hash(passwd); |
347 | passwd = passwd.Remove(0, 3); //remove $1$ | 362 | passwd = passwd.Remove(0, 3); //remove $1$ |
348 | string token = m_AuthenticationService.Authenticate(account.PrincipalID, passwd, 30); | 363 | UUID realID; |
364 | string token = m_AuthenticationService.Authenticate(account.PrincipalID, passwd, 30, out realID); | ||
349 | UUID secureSession = UUID.Zero; | 365 | UUID secureSession = UUID.Zero; |
350 | if ((token == string.Empty) || (token != string.Empty && !UUID.TryParse(token, out secureSession))) | 366 | if ((token == string.Empty) || (token != string.Empty && !UUID.TryParse(token, out secureSession))) |
351 | { | 367 | { |
@@ -512,11 +528,11 @@ namespace OpenSim.Services.LLLoginService | |||
512 | processedMessage = processedMessage.Replace("\\n", "\n").Replace("<USERNAME>", firstName + " " + lastName); | 528 | processedMessage = processedMessage.Replace("\\n", "\n").Replace("<USERNAME>", firstName + " " + lastName); |
513 | 529 | ||
514 | LLLoginResponse response | 530 | LLLoginResponse response |
515 | = new LLLoginResponse( | 531 | = new LLLoginResponse( |
516 | account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, | 532 | account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, |
517 | where, startLocation, position, lookAt, gestures, processedMessage, home, clientIP, | 533 | where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, |
518 | m_MapTileURL, m_SearchURL, m_Currency, m_DSTZone, | 534 | m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency, m_DSTZone, |
519 | m_DestinationGuide, m_AvatarPicker, m_ClassifiedFee, m_MaxAgentGroups); | 535 | m_DestinationGuide, m_AvatarPicker, realID, m_ClassifiedFee,m_MaxAgentGroups); |
520 | 536 | ||
521 | m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName); | 537 | m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName); |
522 | 538 | ||