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