diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginService.cs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index d7cade5..647bdb8 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -301,16 +301,22 @@ namespace OpenSim.Services.LLLoginService | |||
301 | // | 301 | // |
302 | // Check client | 302 | // Check client |
303 | // | 303 | // |
304 | string clientNameToCheck; | ||
305 | if(clientVersion.Contains(" ")) | ||
306 | clientNameToCheck = clientVersion; | ||
307 | else | ||
308 | clientNameToCheck = channel + " " + clientVersion; | ||
309 | |||
304 | if (!String.IsNullOrWhiteSpace(m_AllowedClients)) | 310 | if (!String.IsNullOrWhiteSpace(m_AllowedClients)) |
305 | { | 311 | { |
306 | Regex arx = new Regex(m_AllowedClients); | 312 | Regex arx = new Regex(m_AllowedClients); |
307 | Match am = arx.Match(clientVersion); | 313 | Match am = arx.Match(clientNameToCheck); |
308 | 314 | ||
309 | if (!am.Success) | 315 | if (!am.Success) |
310 | { | 316 | { |
311 | m_log.InfoFormat( | 317 | m_log.InfoFormat( |
312 | "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: client {2} is not allowed", | 318 | "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: client {2} is not allowed", |
313 | firstName, lastName, clientVersion); | 319 | firstName, lastName, clientNameToCheck); |
314 | return LLFailedLoginResponse.LoginBlockedProblem; | 320 | return LLFailedLoginResponse.LoginBlockedProblem; |
315 | } | 321 | } |
316 | } | 322 | } |
@@ -318,13 +324,13 @@ namespace OpenSim.Services.LLLoginService | |||
318 | if (!String.IsNullOrWhiteSpace(m_DeniedClients)) | 324 | if (!String.IsNullOrWhiteSpace(m_DeniedClients)) |
319 | { | 325 | { |
320 | Regex drx = new Regex(m_DeniedClients); | 326 | Regex drx = new Regex(m_DeniedClients); |
321 | Match dm = drx.Match(clientVersion); | 327 | Match dm = drx.Match(clientNameToCheck); |
322 | 328 | ||
323 | if (dm.Success) | 329 | if (dm.Success) |
324 | { | 330 | { |
325 | m_log.InfoFormat( | 331 | m_log.InfoFormat( |
326 | "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: client {2} is denied", | 332 | "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: client {2} is denied", |
327 | firstName, lastName, clientVersion); | 333 | firstName, lastName, clientNameToCheck); |
328 | return LLFailedLoginResponse.LoginBlockedProblem; | 334 | return LLFailedLoginResponse.LoginBlockedProblem; |
329 | } | 335 | } |
330 | } | 336 | } |