aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Clients
diff options
context:
space:
mode:
authordiva2009-04-14 19:35:35 +0000
committerdiva2009-04-14 19:35:35 +0000
commit0413d052a3ec541164049e7d39278c57fb92ed06 (patch)
tree9a58c9c51487278d67e1ad9b3a60668769434001 /OpenSim/Framework/Communications/Clients
parent* Make archiver tests pump the asset server manually instead of starting the ... (diff)
downloadopensim-SC_OLD-0413d052a3ec541164049e7d39278c57fb92ed06.zip
opensim-SC_OLD-0413d052a3ec541164049e7d39278c57fb92ed06.tar.gz
opensim-SC_OLD-0413d052a3ec541164049e7d39278c57fb92ed06.tar.bz2
opensim-SC_OLD-0413d052a3ec541164049e7d39278c57fb92ed06.tar.xz
Adds session authentication upon NewUserConnections. Adds user key authentication (in safemode only) upon CreateChildAgents. All of this for Hypergrid users too. This addresses assorted spoofing vulnerabilities.
Diffstat (limited to 'OpenSim/Framework/Communications/Clients')
-rw-r--r--OpenSim/Framework/Communications/Clients/RegionClient.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Framework/Communications/Clients/RegionClient.cs b/OpenSim/Framework/Communications/Clients/RegionClient.cs
index 27353b0..da3f620 100644
--- a/OpenSim/Framework/Communications/Clients/RegionClient.cs
+++ b/OpenSim/Framework/Communications/Clients/RegionClient.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Framework.Communications.Clients
43 { 43 {
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 public bool DoCreateChildAgentCall(RegionInfo region, AgentCircuitData aCircuit) 46 public bool DoCreateChildAgentCall(RegionInfo region, AgentCircuitData aCircuit, string authKey)
47 { 47 {
48 // Eventually, we want to use a caps url instead of the agentID 48 // Eventually, we want to use a caps url instead of the agentID
49 string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/agent/" + aCircuit.AgentID + "/"; 49 string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/agent/" + aCircuit.AgentID + "/";
@@ -54,6 +54,7 @@ namespace OpenSim.Framework.Communications.Clients
54 AgentCreateRequest.ContentType = "application/json"; 54 AgentCreateRequest.ContentType = "application/json";
55 AgentCreateRequest.Timeout = 10000; 55 AgentCreateRequest.Timeout = 10000;
56 //AgentCreateRequest.KeepAlive = false; 56 //AgentCreateRequest.KeepAlive = false;
57 AgentCreateRequest.Headers.Add("Authorization", authKey);
57 58
58 // Fill it in 59 // Fill it in
59 OSDMap args = null; 60 OSDMap args = null;
@@ -80,7 +81,7 @@ namespace OpenSim.Framework.Communications.Clients
80 } 81 }
81 catch (Exception e) 82 catch (Exception e)
82 { 83 {
83 m_log.WarnFormat("[OSG2]: Exception thrown on serialization of ChildCreate: {0}", e.Message); 84 m_log.WarnFormat("[REST COMMS]: Exception thrown on serialization of ChildCreate: {0}", e.Message);
84 // ignore. buffer will be empty, caller should check. 85 // ignore. buffer will be empty, caller should check.
85 } 86 }
86 87
@@ -91,7 +92,7 @@ namespace OpenSim.Framework.Communications.Clients
91 os = AgentCreateRequest.GetRequestStream(); 92 os = AgentCreateRequest.GetRequestStream();
92 os.Write(buffer, 0, strBuffer.Length); //Send it 93 os.Write(buffer, 0, strBuffer.Length); //Send it
93 os.Close(); 94 os.Close();
94 //m_log.InfoFormat("[REST COMMS]: Posted ChildAgentUpdate request to remote sim {0}", uri); 95 //m_log.InfoFormat("[REST COMMS]: Posted CreateChildAgent request to remote sim {0}", uri);
95 } 96 }
96 //catch (WebException ex) 97 //catch (WebException ex)
97 catch 98 catch