aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorSignpostMarv Martin2011-03-24 16:46:21 +0000
committerJustin Clark-Casey (justincc)2011-03-26 02:28:11 +0000
commit3f4be42a87f77d5da7e6cafd4fb98ff6a502636d (patch)
treecdc0a16bea7300acf0e2790dabd4bfe6bb19c917 /OpenSim
parentFixing bug that occurs when using web login- the result was not checked (diff)
downloadopensim-SC_OLD-3f4be42a87f77d5da7e6cafd4fb98ff6a502636d.zip
opensim-SC_OLD-3f4be42a87f77d5da7e6cafd4fb98ff6a502636d.tar.gz
opensim-SC_OLD-3f4be42a87f77d5da7e6cafd4fb98ff6a502636d.tar.bz2
opensim-SC_OLD-3f4be42a87f77d5da7e6cafd4fb98ff6a502636d.tar.xz
Altering log feedback
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs23
-rw-r--r--OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs8
2 files changed, 17 insertions, 14 deletions
diff --git a/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs
index 5924026..2344c0e 100644
--- a/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs
+++ b/OpenSim/Services/AuthenticationService/WebkeyAuthenticationService.cs
@@ -57,10 +57,9 @@ namespace OpenSim.Services.AuthenticationService
57 57
58 public string Authenticate(UUID principalID, string password, int lifetime) 58 public string Authenticate(UUID principalID, string password, int lifetime)
59 { 59 {
60 m_log.InfoFormat("[Authenticate]: Trying a web key authenticate");
61 if (new UUID(password) == UUID.Zero) 60 if (new UUID(password) == UUID.Zero)
62 { 61 {
63 m_log.InfoFormat("[Authenticate]: NULL_KEY is not a valid web_login_key"); 62 m_log.DebugFormat("[AUTH SERVICE]: UUID.Zero is not a valid web_login_key on PrincipalID {0}", principalID);
64 } 63 }
65 else 64 else
66 { 65 {
@@ -69,17 +68,19 @@ namespace OpenSim.Services.AuthenticationService
69 { 68 {
70 if (data.Data.ContainsKey("webLoginKey")) 69 if (data.Data.ContainsKey("webLoginKey"))
71 { 70 {
72 m_log.InfoFormat("[Authenticate]: Trying a web key authentication");
73 string key = data.Data["webLoginKey"].ToString(); 71 string key = data.Data["webLoginKey"].ToString();
74 m_log.DebugFormat("[WEB LOGIN AUTH]: got {0} for key in db vs {1}", key, password); 72 if (key == password)
75 if (key == password) 73 {
76 { 74 data.Data["webLoginKey"] = UUID.Zero.ToString();
77 data.Data["webLoginKey"] = UUID.Zero.ToString(); 75 m_Database.Store(data);
78 m_Database.Store(data); 76 return GetToken(principalID, lifetime);
79 return GetToken(principalID, lifetime); 77 }
80 } 78 else
79 {
80 m_log.DebugFormat("[AUTH SERVICE]: web login auth failed, got PrincipalID {0} gave {1} instead of {2}", principalID, password, key);
81 }
81 }else{ 82 }else{
82 m_log.DebugFormat("[Authenticate]: no col webLoginKey in passwd.db"); 83 m_log.DebugFormat("[AUTH SERVICE]: no col webLoginKey in passwd.db");
83 } 84 }
84 } 85 }
85 m_log.DebugFormat("[AUTH SERVICE]: PrincipalID {0} or its data not found", principalID); 86 m_log.DebugFormat("[AUTH SERVICE]: PrincipalID {0} or its data not found", principalID);
diff --git a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
index 3a47e97..c315ef2 100644
--- a/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
+++ b/OpenSim/Services/AuthenticationService/WebkeyOrPasswordAuthenticationService.cs
@@ -32,25 +32,27 @@ namespace OpenSim.Services.AuthenticationService
32 { 32 {
33 if (data.Data.ContainsKey("webLoginKey")) 33 if (data.Data.ContainsKey("webLoginKey"))
34 { 34 {
35 m_log.DebugFormat("[AUTH SERVICE]: Attempting web key authentication for PrincipalID {0}", principalID);
35 svc = ServerUtils.LoadPlugin<IAuthenticationService>("OpenSim.Services.AuthenticationService.dll", "WebkeyAuthenticationService", args); 36 svc = ServerUtils.LoadPlugin<IAuthenticationService>("OpenSim.Services.AuthenticationService.dll", "WebkeyAuthenticationService", args);
36 result = svc.Authenticate(principalID, password, lifetime); 37 result = svc.Authenticate(principalID, password, lifetime);
37 if (result == String.Empty) 38 if (result == String.Empty)
38 { 39 {
39 m_log.DebugFormat("[Authenticate]: Web Login failed for PrincipalID {0}", principalID); 40 m_log.DebugFormat("[AUTH SERVICE]: Web Login failed for PrincipalID {0}", principalID);
40 } 41 }
41 } 42 }
42 if (result == string.Empty && data.Data.ContainsKey("passwordHash") && data.Data.ContainsKey("passwordSalt")) 43 if (result == string.Empty && data.Data.ContainsKey("passwordHash") && data.Data.ContainsKey("passwordSalt"))
43 { 44 {
45 m_log.DebugFormat("[AUTH SERVICE]: Attempting password authentication for PrincipalID {0}", principalID);
44 svc = ServerUtils.LoadPlugin<IAuthenticationService>("OpenSim.Services.AuthenticationService.dll", "PasswordAuthenticationService", args); 46 svc = ServerUtils.LoadPlugin<IAuthenticationService>("OpenSim.Services.AuthenticationService.dll", "PasswordAuthenticationService", args);
45 result = svc.Authenticate(principalID, password, lifetime); 47 result = svc.Authenticate(principalID, password, lifetime);
46 if (result == String.Empty) 48 if (result == String.Empty)
47 { 49 {
48 m_log.DebugFormat("[Authenticate]: Password login failed for PrincipalID {0}", principalID); 50 m_log.DebugFormat("[AUTH SERVICE]: Password login failed for PrincipalID {0}", principalID);
49 } 51 }
50 } 52 }
51 if (result == string.Empty) 53 if (result == string.Empty)
52 { 54 {
53 m_log.DebugFormat("[AUTH SERVICE]: Both password and webLoginKey-based login failed for PrincipalID {0}", principalID); 55 m_log.DebugFormat("[AUTH SERVICE]: Both password and webLoginKey-based authentication failed for PrincipalID {0}", principalID);
54 } 56 }
55 } 57 }
56 else 58 else