Renamed ZM_AUTH_CASE_INSENSITIVE_USERNAMES to ZM_CASE_INSENSITIVE_USERNAMES as name was too long ZoneMinder/zoneminder#3516
parent
63e5b63eec
commit
6c0f40f570
|
@ -16,7 +16,7 @@ OPT_USE_AUTH - ZoneMinder can run in two modes. The simplest is an entirely unau
|
||||||
|
|
||||||
AUTH_TYPE - ZoneMinder can use two methods to authenticate users when running in authenticated mode. The first is a builtin method where ZoneMinder provides facilities for users to log in and maintains track of their identity. The second method allows interworking with other methods such as http basic authentication which passes an independently authenticated 'remote' user via http. In this case ZoneMinder would use the supplied user without additional authentication provided such a user is configured in ZoneMinder.
|
AUTH_TYPE - ZoneMinder can use two methods to authenticate users when running in authenticated mode. The first is a builtin method where ZoneMinder provides facilities for users to log in and maintains track of their identity. The second method allows interworking with other methods such as http basic authentication which passes an independently authenticated 'remote' user via http. In this case ZoneMinder would use the supplied user without additional authentication provided such a user is configured in ZoneMinder.
|
||||||
|
|
||||||
AUTH_CASE_INSENSITIVE_USERNAMES - This option makes usernames case insensitive when authenticating. Matches against lower-case usernames in the database. May be used with "remote" AUTH_TYPE and LDAP authentication.
|
CASE_INSENSITIVE_USERNAMES - This option makes usernames case insensitive when authenticating. Matches against lower-case usernames in the database. May be used with "remote" AUTH_TYPE and LDAP authentication.
|
||||||
|
|
||||||
AUTH_RELAY - When ZoneMinder is running in authenticated mode it can pass user details between the web pages and the back end processes. There are two methods for doing this. This first is to use a time limited hashed string which contains no direct username or password details, the second method is to pass the username and passwords around in plaintext. This method is not recommend except where you do not have the md5 libraries available on your system or you have a completely isolated system with no external access. You can also switch off authentication relaying if your system is isolated in other ways.
|
AUTH_RELAY - When ZoneMinder is running in authenticated mode it can pass user details between the web pages and the back end processes. There are two methods for doing this. This first is to use a time limited hashed string which contains no direct username or password details, the second method is to pass the username and passwords around in plaintext. This method is not recommend except where you do not have the md5 libraries available on your system or you have a completely isolated system with no external access. You can also switch off authentication relaying if your system is isolated in other ways.
|
||||||
|
|
||||||
|
|
|
@ -314,7 +314,7 @@ our @options = (
|
||||||
category => 'system',
|
category => 'system',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => 'ZM_AUTH_CASE_INSENSITIVE_USERNAMES',
|
name => 'ZM_CASE_INSENSITIVE_USERNAMES',
|
||||||
default => 'no',
|
default => 'no',
|
||||||
description => 'Case insensitive username authentication',
|
description => 'Case insensitive username authentication',
|
||||||
help => q`
|
help => q`
|
||||||
|
|
|
@ -61,7 +61,7 @@ function validateUser($username='', $password='') {
|
||||||
$sql = 'SELECT * FROM Users WHERE Enabled=1 AND Username=?';
|
$sql = 'SELECT * FROM Users WHERE Enabled=1 AND Username=?';
|
||||||
// local user, shouldn't affect the global user
|
// local user, shouldn't affect the global user
|
||||||
$user = null; // Not global
|
$user = null; // Not global
|
||||||
if (ZM_AUTH_CASE_INSENSITIVE_USERNAMES) {
|
if (ZM_CASE_INSENSITIVE_USERNAMES) {
|
||||||
$user = dbFetchOne($sql, NULL, array(strtolower($username)));
|
$user = dbFetchOne($sql, NULL, array(strtolower($username)));
|
||||||
} else {
|
} else {
|
||||||
$user = dbFetchOne($sql, NULL, array($username));
|
$user = dbFetchOne($sql, NULL, array($username));
|
||||||
|
@ -273,7 +273,7 @@ function userFromSession() {
|
||||||
} else {
|
} else {
|
||||||
# Need to refresh permissions and validate that the user still exists
|
# Need to refresh permissions and validate that the user still exists
|
||||||
$sql = 'SELECT * FROM Users WHERE Enabled=1 AND Username=?';
|
$sql = 'SELECT * FROM Users WHERE Enabled=1 AND Username=?';
|
||||||
if (ZM_AUTH_CASE_INSENSITIVE_USERNAMES) {
|
if (ZM_CASE_INSENSITIVE_USERNAMES) {
|
||||||
$user = dbFetchOne($sql, NULL, array(strtolower($_SESSION['username'])));
|
$user = dbFetchOne($sql, NULL, array(strtolower($_SESSION['username'])));
|
||||||
} else {
|
} else {
|
||||||
$user = dbFetchOne($sql, NULL, array(c));
|
$user = dbFetchOne($sql, NULL, array(c));
|
||||||
|
@ -327,7 +327,7 @@ if (ZM_OPT_USE_AUTH) {
|
||||||
} else if ((ZM_AUTH_TYPE == 'remote') and !empty($_SERVER['REMOTE_USER'])) {
|
} else if ((ZM_AUTH_TYPE == 'remote') and !empty($_SERVER['REMOTE_USER'])) {
|
||||||
$sql = 'SELECT * FROM Users WHERE Enabled=1 AND Username=?';
|
$sql = 'SELECT * FROM Users WHERE Enabled=1 AND Username=?';
|
||||||
// local user, shouldn't affect the global user
|
// local user, shouldn't affect the global user
|
||||||
if (ZM_AUTH_CASE_INSENSITIVE_USERNAMES) {
|
if (ZM_CASE_INSENSITIVE_USERNAMES) {
|
||||||
$user = dbFetchOne($sql, NULL, array(strtolower($_SERVER['REMOTE_USER'])));
|
$user = dbFetchOne($sql, NULL, array(strtolower($_SERVER['REMOTE_USER'])));
|
||||||
} else {
|
} else {
|
||||||
$user = dbFetchOne($sql, NULL, array($_SERVER['REMOTE_USER']));
|
$user = dbFetchOne($sql, NULL, array($_SERVER['REMOTE_USER']));
|
||||||
|
|
Loading…
Reference in New Issue