aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/Communications/LoginService.cs29
1 files changed, 18 insertions, 11 deletions
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs
index e4e00a7..90c5206 100644
--- a/OpenSim/Framework/Communications/LoginService.cs
+++ b/OpenSim/Framework/Communications/LoginService.cs
@@ -323,6 +323,21 @@ namespace OpenSim.Framework.Communications
323 return GoodLogin; 323 return GoodLogin;
324 } 324 }
325 325
326 protected virtual bool TryAuthenticateLLSDLogin( string firstname, string lastname, string passwd, out UserProfileData userProfile)
327 {
328 bool GoodLogin = false;
329 userProfile = GetTheUser(firstname, lastname);
330 if (userProfile == null)
331 {
332 m_log.Info("[LOGIN]: LLSD Could not find a profile for " + firstname + " " + lastname);
333
334 return false;
335 }
336
337 GoodLogin = AuthenticateUser(userProfile, passwd);
338 return GoodLogin;
339 }
340
326 /// <summary> 341 /// <summary>
327 /// Called when we receive the client's initial LLSD login_to_simulator request message 342 /// Called when we receive the client's initial LLSD login_to_simulator request message
328 /// </summary> 343 /// </summary>
@@ -359,23 +374,15 @@ namespace OpenSim.Framework.Communications
359 } 374 }
360 m_log.Info("[LOGIN]: LLSD Login Requested for: '" + firstname+"' '"+lastname+"' / "+passwd); 375 m_log.Info("[LOGIN]: LLSD Login Requested for: '" + firstname+"' '"+lastname+"' / "+passwd);
361 376
362 userProfile = GetTheUser(firstname, lastname); 377 if (!TryAuthenticateLLSDLogin( firstname, lastname, passwd, out userProfile))
363 if (userProfile == null)
364 { 378 {
365 m_log.Info("[LOGIN]: LLSD Could not find a profile for " + firstname + " " + lastname);
366
367 return logResponse.CreateLoginFailedResponseLLSD(); 379 return logResponse.CreateLoginFailedResponseLLSD();
368 } 380 }
369
370 GoodLogin = AuthenticateUser(userProfile, passwd);
371 } 381 }
372 } 382 }
373 383
374 if (!GoodLogin) 384
375 { 385 if (userProfile.GodLevel < m_minLoginLevel)
376 return logResponse.CreateLoginFailedResponseLLSD();
377 }
378 else if (userProfile.GodLevel < m_minLoginLevel)
379 { 386 {
380 return logResponse.CreateLoginBlockedResponseLLSD(); 387 return logResponse.CreateLoginBlockedResponseLLSD();
381 } 388 }