diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index d7cade5141..647bdb8558 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -301,16 +301,22 @@ namespace OpenSim.Services.LLLoginService // // Check client // + string clientNameToCheck; + if(clientVersion.Contains(" ")) + clientNameToCheck = clientVersion; + else + clientNameToCheck = channel + " " + clientVersion; + if (!String.IsNullOrWhiteSpace(m_AllowedClients)) { Regex arx = new Regex(m_AllowedClients); - Match am = arx.Match(clientVersion); + Match am = arx.Match(clientNameToCheck); if (!am.Success) { m_log.InfoFormat( "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: client {2} is not allowed", - firstName, lastName, clientVersion); + firstName, lastName, clientNameToCheck); return LLFailedLoginResponse.LoginBlockedProblem; } } @@ -318,13 +324,13 @@ namespace OpenSim.Services.LLLoginService if (!String.IsNullOrWhiteSpace(m_DeniedClients)) { Regex drx = new Regex(m_DeniedClients); - Match dm = drx.Match(clientVersion); + Match dm = drx.Match(clientNameToCheck); if (dm.Success) { m_log.InfoFormat( "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: client {2} is denied", - firstName, lastName, clientVersion); + firstName, lastName, clientNameToCheck); return LLFailedLoginResponse.LoginBlockedProblem; } }