aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Services/HGLoginAuthService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications/Services/HGLoginAuthService.cs')
-rw-r--r--OpenSim/Framework/Communications/Services/HGLoginAuthService.cs32
1 files changed, 19 insertions, 13 deletions
diff --git a/OpenSim/Framework/Communications/Services/HGLoginAuthService.cs b/OpenSim/Framework/Communications/Services/HGLoginAuthService.cs
index 37c8846..cd4ca5c 100644
--- a/OpenSim/Framework/Communications/Services/HGLoginAuthService.cs
+++ b/OpenSim/Framework/Communications/Services/HGLoginAuthService.cs
@@ -169,22 +169,28 @@ namespace OpenSim.Framework.Communications.Services
169 m_log.Debug(" >> Null"); 169 m_log.Debug(" >> Null");
170 } 170 }
171 171
172 // Verify the key of who's calling
173 UUID userID = UUID.Zero;
174 string authKey = string.Empty;
175 UUID.TryParse((string)request.Params[0], out userID);
176 authKey = (string)request.Params[1];
177
178 m_log.InfoFormat("[HGLOGIN] HGVerifyKey called with key ", authKey);
179 bool success = false; 172 bool success = false;
180 173
181 if (!(m_userManager is IAuthentication)) 174 if (request.Params.Count >= 2)
182 { 175 {
183 m_log.Debug("[HGLOGIN]: UserManager is not IAuthentication service. Denying."); 176 // Verify the key of who's calling
184 } 177 UUID userID = UUID.Zero;
185 else 178 string authKey = string.Empty;
186 { 179 if (UUID.TryParse((string)request.Params[0], out userID))
187 success = ((IAuthentication)m_userManager).VerifyKey(userID, authKey); 180 {
181 authKey = (string)request.Params[1];
182
183 m_log.InfoFormat("[HGLOGIN] HGVerifyKey called with key ", authKey);
184
185 if (!(m_userManager is IAuthentication))
186 {
187 m_log.Debug("[HGLOGIN]: UserManager is not IAuthentication service. Denying.");
188 }
189 else
190 {
191 success = ((IAuthentication)m_userManager).VerifyKey(userID, authKey);
192 }
193 }
188 } 194 }
189 195
190 XmlRpcResponse response = new XmlRpcResponse(); 196 XmlRpcResponse response = new XmlRpcResponse();