From 47b84875fd2b9f01140288a2695c33f5ef4466c0 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Sun, 18 May 2014 19:45:27 +0300 Subject: Tell QueryAccess explicitly whether the user is coming in via Teleport or Cross, because the permission checks are different. Previously we used a heuristic of checking if the entry position is 0 to differentiate between Teleport and Cross, but that doesn't work anymore since we've started providing the precise entry position for cross, too. That's required in order to ensure that the user is allowed to enter the parcel that he's walking into. --- OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'OpenSim/Server') diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index 06392f7..7291931 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs @@ -132,6 +132,10 @@ namespace OpenSim.Server.Handlers.Simulation // m_log.DebugFormat("[AGENT HANDLER]: Received QUERYACCESS with {0}", (string)request["body"]); OSDMap args = Utils.GetOSDMap((string)request["body"]); + bool viaTeleport = true; + if (args.ContainsKey("viaTeleport")) + viaTeleport = args["viaTeleport"].AsBoolean(); + Vector3 position = Vector3.Zero; if (args.ContainsKey("position")) position = Vector3.Parse(args["position"].AsString()); @@ -145,7 +149,7 @@ namespace OpenSim.Server.Handlers.Simulation string reason; string version; - bool result = m_SimulationService.QueryAccess(destination, agentID, agentHomeURI, position, out version, out reason); + bool result = m_SimulationService.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, out version, out reason); responsedata["int_response_code"] = HttpStatusCode.OK; -- cgit v1.1