aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Services
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-07-10 18:40:37 +0000
committerJustin Clarke Casey2009-07-10 18:40:37 +0000
commit148e2d55fa4dcf6e87ffce5c67f2ca2ea9e88a08 (patch)
tree05ee0edd8da82933fb495312497972ed7cc7935a /OpenSim/Framework/Communications/Services
parentNow we are past revision 10000, I think its time to start to fix that massive... (diff)
downloadopensim-SC_OLD-148e2d55fa4dcf6e87ffce5c67f2ca2ea9e88a08.zip
opensim-SC_OLD-148e2d55fa4dcf6e87ffce5c67f2ca2ea9e88a08.tar.gz
opensim-SC_OLD-148e2d55fa4dcf6e87ffce5c67f2ca2ea9e88a08.tar.bz2
opensim-SC_OLD-148e2d55fa4dcf6e87ffce5c67f2ca2ea9e88a08.tar.xz
* minor: Make GridCommon.ini.example refer to inventory service rather than asset where appropriate
* Send debug level notice to console if a user fails authentication
Diffstat (limited to 'OpenSim/Framework/Communications/Services')
-rw-r--r--OpenSim/Framework/Communications/Services/LoginService.cs36
1 files changed, 27 insertions, 9 deletions
diff --git a/OpenSim/Framework/Communications/Services/LoginService.cs b/OpenSim/Framework/Communications/Services/LoginService.cs
index a9be197..9709975 100644
--- a/OpenSim/Framework/Communications/Services/LoginService.cs
+++ b/OpenSim/Framework/Communications/Services/LoginService.cs
@@ -311,37 +311,55 @@ namespace OpenSim.Framework.Communications.Services
311 { 311 {
312 Hashtable requestData = (Hashtable)request.Params[0]; 312 Hashtable requestData = (Hashtable)request.Params[0];
313 313
314 bool GoodLogin = false;
315
316 userProfile = GetTheUser(firstname, lastname); 314 userProfile = GetTheUser(firstname, lastname);
317 if (userProfile == null) 315 if (userProfile == null)
318 { 316 {
319 m_log.Info("[LOGIN END]: XMLRPC Could not find a profile for " + firstname + " " + lastname); 317 m_log.Debug("[LOGIN END]: XMLRPC Could not find a profile for " + firstname + " " + lastname);
318 return false;
320 } 319 }
321 else 320 else
322 { 321 {
323 if (requestData.Contains("passwd")) 322 if (requestData.Contains("passwd"))
324 { 323 {
325 string passwd = (string)requestData["passwd"]; 324 string passwd = (string)requestData["passwd"];
326 GoodLogin = AuthenticateUser(userProfile, passwd); 325 bool authenticated = AuthenticateUser(userProfile, passwd);
326
327 if (!authenticated)
328 m_log.DebugFormat("[LOGIN END]: XMLRPC User {0} {1} failed password authentication",
329 firstname, lastname);
330
331 return authenticated;
327 } 332 }
328 if (!GoodLogin && (requestData.Contains("web_login_key"))) 333
334 if (requestData.Contains("web_login_key"))
329 { 335 {
330 try 336 try
331 { 337 {
332 UUID webloginkey = new UUID((string)requestData["web_login_key"]); 338 UUID webloginkey = new UUID((string)requestData["web_login_key"]);
333 GoodLogin = AuthenticateUser(userProfile, webloginkey); 339 bool authenticated = AuthenticateUser(userProfile, webloginkey);
340
341 if (!authenticated)
342 m_log.DebugFormat("[LOGIN END]: XMLRPC User {0} {1} failed web login key authentication",
343 firstname, lastname);
344
345 return authenticated;
334 } 346 }
335 catch (Exception e) 347 catch (Exception e)
336 { 348 {
337 m_log.InfoFormat( 349 m_log.DebugFormat(
338 "[LOGIN END]: XMLRPC Bad web_login_key: {0} for user {1} {2}, exception {3}", 350 "[LOGIN END]: XMLRPC Bad web_login_key: {0} for user {1} {2}, exception {3}",
339 requestData["web_login_key"], firstname, lastname, e); 351 requestData["web_login_key"], firstname, lastname, e);
352
353 return false;
340 } 354 }
341 } 355 }
356
357 m_log.DebugFormat(
358 "[LOGIN END]: XMLRPC login request for {0} {1} contained neither a password nor a web login key",
359 firstname, lastname);
342 } 360 }
343 361
344 return GoodLogin; 362 return false;
345 } 363 }
346 364
347 protected virtual bool TryAuthenticateLLSDLogin(string firstname, string lastname, string passwd, out UserProfileData userProfile) 365 protected virtual bool TryAuthenticateLLSDLogin(string firstname, string lastname, string passwd, out UserProfileData userProfile)