diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 56bdc63..f864392 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3986,7 +3986,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3986 | 3986 | ||
3987 | try | 3987 | try |
3988 | { | 3988 | { |
3989 | if (!AuthorizeUser(acd, SeeIntoRegion, out reason)) | 3989 | if (!AuthorizeUser(acd, (vialogin ? false : SeeIntoRegion), out reason)) |
3990 | { | 3990 | { |
3991 | m_authenticateHandler.RemoveCircuit(acd.circuitcode); | 3991 | m_authenticateHandler.RemoveCircuit(acd.circuitcode); |
3992 | return false; | 3992 | return false; |
@@ -4596,10 +4596,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
4596 | 4596 | ||
4597 | // Check that the auth_token is valid | 4597 | // Check that the auth_token is valid |
4598 | AgentCircuitData acd = AuthenticateHandler.GetAgentCircuitData(agentID); | 4598 | AgentCircuitData acd = AuthenticateHandler.GetAgentCircuitData(agentID); |
4599 | if (acd != null && acd.SessionID.ToString() == auth_token) | 4599 | |
4600 | if (acd == null) | ||
4601 | { | ||
4602 | m_log.DebugFormat( | ||
4603 | "[SCENE]: Request to close agent {0} but no such agent in scene {1}. May have been closed previously.", | ||
4604 | agentID, Name); | ||
4605 | |||
4606 | return false; | ||
4607 | } | ||
4608 | |||
4609 | if (acd.SessionID.ToString() == auth_token) | ||
4610 | { | ||
4600 | return IncomingCloseAgent(agentID, force); | 4611 | return IncomingCloseAgent(agentID, force); |
4612 | } | ||
4601 | else | 4613 | else |
4602 | m_log.ErrorFormat("[SCENE]: Request to close agent {0} with invalid authorization token {1}", agentID, auth_token); | 4614 | { |
4615 | m_log.WarnFormat( | ||
4616 | "[SCENE]: Request to close agent {0} with invalid authorization token {1} in {2}", | ||
4617 | agentID, auth_token, Name); | ||
4618 | } | ||
4619 | |||
4603 | return false; | 4620 | return false; |
4604 | } | 4621 | } |
4605 | 4622 | ||