diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 2890ecd..2f862ea 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2538,26 +2538,26 @@ namespace OpenSim.Region.Framework.Scenes | |||
2538 | { | 2538 | { |
2539 | AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(client.CircuitCode); | 2539 | AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(client.CircuitCode); |
2540 | 2540 | ||
2541 | // Do the verification here | 2541 | //// Do the verification here -- No, really don't do this here. This is UDP address, let it go. |
2542 | System.Net.IPEndPoint ep = (System.Net.IPEndPoint)client.GetClientEP(); | 2542 | //System.Net.IPEndPoint ep = (System.Net.IPEndPoint)client.GetClientEP(); |
2543 | if (aCircuit != null) | 2543 | //if (aCircuit != null) |
2544 | { | 2544 | //{ |
2545 | if (!VerifyClient(aCircuit, ep, out vialogin)) | 2545 | // if (!VerifyClient(aCircuit, ep, out vialogin)) |
2546 | { | 2546 | // { |
2547 | // uh-oh, this is fishy | 2547 | // // uh-oh, this is fishy |
2548 | m_log.WarnFormat("[SCENE]: Agent {0} with session {1} connecting with unidentified end point {2}. Refusing service.", | 2548 | // m_log.WarnFormat("[SCENE]: Agent {0} with session {1} connecting with unidentified end point {2}. Refusing service.", |
2549 | client.AgentId, client.SessionId, ep.ToString()); | 2549 | // client.AgentId, client.SessionId, ep.ToString()); |
2550 | try | 2550 | // try |
2551 | { | 2551 | // { |
2552 | client.Close(); | 2552 | // client.Close(); |
2553 | } | 2553 | // } |
2554 | catch (Exception e) | 2554 | // catch (Exception e) |
2555 | { | 2555 | // { |
2556 | m_log.DebugFormat("[SCENE]: Exception while closing aborted client: {0}", e.StackTrace); | 2556 | // m_log.DebugFormat("[SCENE]: Exception while closing aborted client: {0}", e.StackTrace); |
2557 | } | 2557 | // } |
2558 | return; | 2558 | // return; |
2559 | } | 2559 | // } |
2560 | } | 2560 | //} |
2561 | 2561 | ||
2562 | m_log.Debug("[SCENE]: Adding new agent " + client.Name + " to scene " + RegionInfo.RegionName); | 2562 | m_log.Debug("[SCENE]: Adding new agent " + client.Name + " to scene " + RegionInfo.RegionName); |
2563 | 2563 | ||
@@ -2586,16 +2586,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
2586 | vialogin = false; | 2586 | vialogin = false; |
2587 | 2587 | ||
2588 | // Do the verification here | 2588 | // Do the verification here |
2589 | if ((aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0) | 2589 | if ((aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0) |
2590 | { | 2590 | { |
2591 | m_log.DebugFormat("[SCENE]: Incoming client {0} {1} in region {2} via Login", aCircuit.firstname, aCircuit.lastname, RegionInfo.RegionName); | 2591 | m_log.DebugFormat("[SCENE]: Incoming client {0} {1} in region {2} via HG login", aCircuit.firstname, aCircuit.lastname, RegionInfo.RegionName); |
2592 | vialogin = true; | 2592 | vialogin = true; |
2593 | IUserAgentVerificationModule userVerification = RequestModuleInterface<IUserAgentVerificationModule>(); | 2593 | IUserAgentVerificationModule userVerification = RequestModuleInterface<IUserAgentVerificationModule>(); |
2594 | if (userVerification != null && ep != null) | 2594 | if (userVerification != null && ep != null) |
2595 | { | 2595 | { |
2596 | System.Net.IPAddress addr = NetworkUtil.GetExternalIPOf(ep.Address); | 2596 | if (!userVerification.VerifyClient(aCircuit, ep.Address.ToString())) |
2597 | |||
2598 | if (!userVerification.VerifyClient(aCircuit, /*ep.Address.ToString() */ addr.ToString())) | ||
2599 | { | 2597 | { |
2600 | // uh-oh, this is fishy | 2598 | // uh-oh, this is fishy |
2601 | m_log.DebugFormat("[SCENE]: User Client Verification for {0} {1} in {2} returned false", aCircuit.firstname, aCircuit.lastname, RegionInfo.RegionName); | 2599 | m_log.DebugFormat("[SCENE]: User Client Verification for {0} {1} in {2} returned false", aCircuit.firstname, aCircuit.lastname, RegionInfo.RegionName); |
@@ -2606,6 +2604,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2606 | } | 2604 | } |
2607 | } | 2605 | } |
2608 | 2606 | ||
2607 | else if ((aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0) | ||
2608 | m_log.DebugFormat("[SCENE]: Incoming client {0} {1} in region {2} via regular login. Client IP verification not performed.", | ||
2609 | aCircuit.firstname, aCircuit.lastname, RegionInfo.RegionName); | ||
2610 | |||
2609 | return true; | 2611 | return true; |
2610 | } | 2612 | } |
2611 | 2613 | ||