mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-03 14:09:23 +00:00
Be pedantic about checking user is active before we let them in.
This commit is contained in:
parent
97c04fab6f
commit
413618749c
@ -121,8 +121,14 @@ class HTTPAuthSession {
|
||||
*/
|
||||
if ( isset($_SERVER['PHP_AUTH_USER']) ) {
|
||||
if ( $u = $this->CheckPassword( $_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'] ) ) {
|
||||
$this->AssignSessionDetails($u);
|
||||
return;
|
||||
/**
|
||||
* Maybe some external authentication didn't return false for an inactive
|
||||
* user, so we'll be pedantic here.
|
||||
*/
|
||||
if ( $u->active ) {
|
||||
$this->AssignSessionDetails($u);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -227,7 +233,8 @@ class HTTPAuthSession {
|
||||
*/
|
||||
if (isset($c->authenticate_hook['optional']) && $c->authenticate_hook['optional']) {
|
||||
if ($hook_response !== false) { return $hook_response; }
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return $hook_response;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user