mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user