mantis 8396: on access control, change viewer string to match so it does include the viewer name, not just version
parent
492b9e3326
commit
f9a2fbed83
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue