mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
Guard against unauthorized agent deletes.
This commit is contained in:
@@ -286,7 +286,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool CloseAgent(GridRegion destination, UUID id)
|
||||
public bool CloseAgent(GridRegion destination, UUID id, string auth_token)
|
||||
{
|
||||
if (destination == null)
|
||||
return false;
|
||||
@@ -297,7 +297,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||
// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate",
|
||||
// s.RegionInfo.RegionName, destination.RegionHandle);
|
||||
|
||||
m_scenes[destination.RegionID].IncomingCloseAgent(id, false);
|
||||
m_scenes[destination.RegionID].IncomingCloseAgent(id, false, auth_token);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -245,18 +245,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
|
||||
}
|
||||
|
||||
|
||||
public bool CloseAgent(GridRegion destination, UUID id)
|
||||
public bool CloseAgent(GridRegion destination, UUID id, string auth_token)
|
||||
{
|
||||
if (destination == null)
|
||||
return false;
|
||||
|
||||
// Try local first
|
||||
if (m_localBackend.CloseAgent(destination, id))
|
||||
if (m_localBackend.CloseAgent(destination, id, auth_token))
|
||||
return true;
|
||||
|
||||
// else do the remote thing
|
||||
if (!m_localBackend.IsLocalRegion(destination.RegionID))
|
||||
return m_remoteConnector.CloseAgent(destination, id);
|
||||
return m_remoteConnector.CloseAgent(destination, id, auth_token);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user