mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-31 03:34:18 +00:00
Ensure username comparison is fully case-insensitive.
This commit is contained in:
parent
106b0f933d
commit
2598e489bb
@ -90,7 +90,7 @@ class BasicAuthSession {
|
|||||||
return call_user_func( $c->authenticate_hook['call'], $username, $password );
|
return call_user_func( $c->authenticate_hook['call'], $username, $password );
|
||||||
}
|
}
|
||||||
|
|
||||||
$qry = new PgQuery( "SELECT * FROM usr WHERE lower(username) = ? ", $username );
|
$qry = new PgQuery( "SELECT * FROM usr WHERE lower(username) = lower(?) ", $username );
|
||||||
if ( $qry->Exec('BasicAuth',__LINE__,__FILE__) && $qry->rows == 1 ) {
|
if ( $qry->Exec('BasicAuth',__LINE__,__FILE__) && $qry->rows == 1 ) {
|
||||||
$usr = $qry->Fetch();
|
$usr = $qry->Fetch();
|
||||||
dbg_error_log( "BasicAuth", ":CheckPassword: Name:%s, Pass:%s, File:%s", $username, $password, $usr->password );
|
dbg_error_log( "BasicAuth", ":CheckPassword: Name:%s, Pass:%s, File:%s", $username, $password, $usr->password );
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user