From 915c0b17b0638342a3e2de8b4f9d2505014561fd Mon Sep 17 00:00:00 2001 From: Myan Thor Date: Wed, 29 Dec 2010 13:40:47 +0100 Subject: fixes a problem with ending slashes in GatekeeperService to verify session-addresses --- OpenSim/Services/HypergridService/GatekeeperService.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 4419201..bbddd87 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -330,10 +330,12 @@ namespace OpenSim.Services.HypergridService if (parts.Length < 2) return false; - string addressee = parts[0]; - m_log.DebugFormat("[GATEKEEPER SERVICE]: Verifying {0} against {1}", addressee, m_ExternalName); + char[] trailing_slash = new char[] { '/' }; + string addressee = parts[0].TrimEnd(trailing_slash); + string externalname = m_ExternalName.TrimEnd(trailing_slash); + m_log.DebugFormat("[GATEKEEPER SERVICE]: Verifying {0} against {1}", addressee, externalname); - return string.Equals(addressee, m_ExternalName, StringComparison.OrdinalIgnoreCase); + return string.Equals(addressee, externalname, StringComparison.OrdinalIgnoreCase); } #endregion -- cgit v1.1