* Corrected login fail code (adapted from Gareths php)
parent
623e9e991a
commit
3147def23f
|
@ -203,13 +203,17 @@ namespace OpenSim.GridServers
|
|||
passwd = "notfound";
|
||||
}
|
||||
|
||||
XmlRpcResponse response =(XmlRpcResponse)(new XmlRpcResponseDeserializer()).Deserialize(this._defaultResponse);
|
||||
Hashtable responseData = (Hashtable)response.Value;
|
||||
|
||||
if( !Authenticate(first, last, passwd))
|
||||
{
|
||||
// Fail miserably
|
||||
writer.WriteLine("HTTP/1.0 403 Authentication Forbidden");
|
||||
writer.WriteLine();
|
||||
return;
|
||||
responseData["reason"] = "key";
|
||||
responseData["message"] = "You have entered an invalid name/password combination. Check Caps/lock.";
|
||||
responseData["login"] = "false";
|
||||
}
|
||||
else
|
||||
{
|
||||
NumClients++;
|
||||
|
||||
//create a agent and session LLUUID
|
||||
|
@ -233,9 +237,6 @@ namespace OpenSim.GridServers
|
|||
ArrayList GlobalTextures = new ArrayList();
|
||||
GlobalTextures.Add(GlobalT);
|
||||
|
||||
XmlRpcResponse response =(XmlRpcResponse)(new XmlRpcResponseDeserializer()).Deserialize(this._defaultResponse);
|
||||
Hashtable responseData = (Hashtable)response.Value;
|
||||
|
||||
responseData["sim_port"] = OpenSim_Main.cfg.IPListenPort;
|
||||
responseData["sim_ip"] = OpenSim_Main.cfg.IPListenAddr;
|
||||
responseData["agent_id"] = Agent.ToStringHyphenated();
|
||||
|
@ -275,6 +276,7 @@ namespace OpenSim.GridServers
|
|||
{
|
||||
((LocalGridBase)this._gridServer).AddNewSession(_login);
|
||||
}
|
||||
}
|
||||
|
||||
// forward the XML-RPC response to the client
|
||||
writer.WriteLine("HTTP/1.0 200 OK");
|
||||
|
|
Loading…
Reference in New Issue