aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/LLLoginService/LLLoginService.cs
diff options
context:
space:
mode:
authorUbitUmarov2018-11-09 15:22:15 +0000
committerUbitUmarov2018-11-09 15:22:15 +0000
commitf9a2fbed83a33a5734fbd566f356b1fb67dd2c11 (patch)
treeb4cdbb2508994befa769a23cd777725b4f54eb9d /OpenSim/Services/LLLoginService/LLLoginService.cs
parentmantis 8035: fix number of prims use to be from all owned parcels (diff)
downloadopensim-SC-f9a2fbed83a33a5734fbd566f356b1fb67dd2c11.zip
opensim-SC-f9a2fbed83a33a5734fbd566f356b1fb67dd2c11.tar.gz
opensim-SC-f9a2fbed83a33a5734fbd566f356b1fb67dd2c11.tar.bz2
opensim-SC-f9a2fbed83a33a5734fbd566f356b1fb67dd2c11.tar.xz
mantis 8396: on access control, change viewer string to match so it does include the viewer name, not just version
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs14
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 }