diff options
author | Diva Canto | 2013-07-13 21:28:46 -0700 |
---|---|---|
committer | Diva Canto | 2013-07-13 21:28:46 -0700 |
commit | b4f1b9acf65f9e782d56602e60c58be6145c5cca (patch) | |
tree | 33860eecce915dedd2c573f2d3aad026e63706bc /OpenSim/Region/CoreModules | |
parent | Deleted GET agent all around. Not used. (diff) | |
download | opensim-SC_OLD-b4f1b9acf65f9e782d56602e60c58be6145c5cca.zip opensim-SC_OLD-b4f1b9acf65f9e782d56602e60c58be6145c5cca.tar.gz opensim-SC_OLD-b4f1b9acf65f9e782d56602e60c58be6145c5cca.tar.bz2 opensim-SC_OLD-b4f1b9acf65f9e782d56602e60c58be6145c5cca.tar.xz |
Guard against unauthorized agent deletes.
Diffstat (limited to 'OpenSim/Region/CoreModules')
3 files changed, 12 insertions, 12 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 85d26f3..ef2ed4f 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -817,7 +817,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
817 | "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1} from {2}. Keeping avatar in source region.", | 817 | "[ENTITY TRANSFER MODULE]: UpdateAgent failed on teleport of {0} to {1} from {2}. Keeping avatar in source region.", |
818 | sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); | 818 | sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); |
819 | 819 | ||
820 | Fail(sp, finalDestination, logout, "Connection between viewer and destination region could not be established."); | 820 | Fail(sp, finalDestination, logout, Util.Md5Hash(currentAgentCircuit.Id0), "Connection between viewer and destination region could not be established."); |
821 | return; | 821 | return; |
822 | } | 822 | } |
823 | 823 | ||
@@ -829,7 +829,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
829 | "[ENTITY TRANSFER MODULE]: Cancelled teleport of {0} to {1} from {2} after UpdateAgent on client request", | 829 | "[ENTITY TRANSFER MODULE]: Cancelled teleport of {0} to {1} from {2} after UpdateAgent on client request", |
830 | sp.Name, finalDestination.RegionName, sp.Scene.Name); | 830 | sp.Name, finalDestination.RegionName, sp.Scene.Name); |
831 | 831 | ||
832 | CleanupFailedInterRegionTeleport(sp, finalDestination); | 832 | CleanupFailedInterRegionTeleport(sp, Util.Md5Hash(currentAgentCircuit.Id0), finalDestination); |
833 | 833 | ||
834 | return; | 834 | return; |
835 | } | 835 | } |
@@ -873,7 +873,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
873 | "[ENTITY TRANSFER MODULE]: Teleport of {0} to {1} from {2} failed due to no callback from destination region. Returning avatar to source region.", | 873 | "[ENTITY TRANSFER MODULE]: Teleport of {0} to {1} from {2} failed due to no callback from destination region. Returning avatar to source region.", |
874 | sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); | 874 | sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName); |
875 | 875 | ||
876 | Fail(sp, finalDestination, logout, "Destination region did not signal teleport completion."); | 876 | Fail(sp, finalDestination, logout, Util.Md5Hash(currentAgentCircuit.Id0), "Destination region did not signal teleport completion."); |
877 | 877 | ||
878 | return; | 878 | return; |
879 | } | 879 | } |
@@ -927,7 +927,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
927 | /// <remarks> | 927 | /// <remarks> |
928 | /// <param name='sp'> </param> | 928 | /// <param name='sp'> </param> |
929 | /// <param name='finalDestination'></param> | 929 | /// <param name='finalDestination'></param> |
930 | protected virtual void CleanupFailedInterRegionTeleport(ScenePresence sp, GridRegion finalDestination) | 930 | protected virtual void CleanupFailedInterRegionTeleport(ScenePresence sp, string auth_token, GridRegion finalDestination) |
931 | { | 931 | { |
932 | m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); | 932 | m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); |
933 | 933 | ||
@@ -938,7 +938,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
938 | 938 | ||
939 | // Finally, kill the agent we just created at the destination. | 939 | // Finally, kill the agent we just created at the destination. |
940 | // XXX: Possibly this should be done asynchronously. | 940 | // XXX: Possibly this should be done asynchronously. |
941 | Scene.SimulationService.CloseAgent(finalDestination, sp.UUID); | 941 | Scene.SimulationService.CloseAgent(finalDestination, sp.UUID, auth_token); |
942 | } | 942 | } |
943 | 943 | ||
944 | /// <summary> | 944 | /// <summary> |
@@ -948,9 +948,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
948 | /// <param name='finalDestination'></param> | 948 | /// <param name='finalDestination'></param> |
949 | /// <param name='logout'></param> | 949 | /// <param name='logout'></param> |
950 | /// <param name='reason'>Human readable reason for teleport failure. Will be sent to client.</param> | 950 | /// <param name='reason'>Human readable reason for teleport failure. Will be sent to client.</param> |
951 | protected virtual void Fail(ScenePresence sp, GridRegion finalDestination, bool logout, string reason) | 951 | protected virtual void Fail(ScenePresence sp, GridRegion finalDestination, bool logout, string auth_code, string reason) |
952 | { | 952 | { |
953 | CleanupFailedInterRegionTeleport(sp, finalDestination); | 953 | CleanupFailedInterRegionTeleport(sp, auth_code, finalDestination); |
954 | 954 | ||
955 | m_interRegionTeleportFailures.Value++; | 955 | m_interRegionTeleportFailures.Value++; |
956 | 956 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index 2dc3d2a..6d5039b 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs | |||
@@ -286,7 +286,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
286 | return false; | 286 | return false; |
287 | } | 287 | } |
288 | 288 | ||
289 | public bool CloseAgent(GridRegion destination, UUID id) | 289 | public bool CloseAgent(GridRegion destination, UUID id, string auth_token) |
290 | { | 290 | { |
291 | if (destination == null) | 291 | if (destination == null) |
292 | return false; | 292 | return false; |
@@ -297,7 +297,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
297 | // "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", | 297 | // "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", |
298 | // s.RegionInfo.RegionName, destination.RegionHandle); | 298 | // s.RegionInfo.RegionName, destination.RegionHandle); |
299 | 299 | ||
300 | m_scenes[destination.RegionID].IncomingCloseAgent(id, false); | 300 | m_scenes[destination.RegionID].IncomingCloseAgent(id, false, auth_token); |
301 | return true; | 301 | return true; |
302 | } | 302 | } |
303 | 303 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs index 4aa2d2a..8722b80 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs | |||
@@ -245,18 +245,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
245 | } | 245 | } |
246 | 246 | ||
247 | 247 | ||
248 | public bool CloseAgent(GridRegion destination, UUID id) | 248 | public bool CloseAgent(GridRegion destination, UUID id, string auth_token) |
249 | { | 249 | { |
250 | if (destination == null) | 250 | if (destination == null) |
251 | return false; | 251 | return false; |
252 | 252 | ||
253 | // Try local first | 253 | // Try local first |
254 | if (m_localBackend.CloseAgent(destination, id)) | 254 | if (m_localBackend.CloseAgent(destination, id, auth_token)) |
255 | return true; | 255 | return true; |
256 | 256 | ||
257 | // else do the remote thing | 257 | // else do the remote thing |
258 | if (!m_localBackend.IsLocalRegion(destination.RegionID)) | 258 | if (!m_localBackend.IsLocalRegion(destination.RegionID)) |
259 | return m_remoteConnector.CloseAgent(destination, id); | 259 | return m_remoteConnector.CloseAgent(destination, id, auth_token); |
260 | 260 | ||
261 | return false; | 261 | return false; |
262 | } | 262 | } |