mirror of
https://github.com/pi-hole/web.git
synced 2026-04-26 19:55:15 +01:00
remove hard-coded /admin/ path; relocatable
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
This commit is contained in:
committed by
Adam Warner
parent
ec7b7536c6
commit
d94d86bad8
@@ -68,7 +68,11 @@ function verifyPassword($pwhash, $use_api = false)
|
||||
$_SESSION['auth'] = true;
|
||||
|
||||
// Login successful, redirect the user to the original requested page
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && $_SERVER['SCRIPT_NAME'] === '/admin/login.php') {
|
||||
if (
|
||||
$_SERVER['REQUEST_METHOD'] === 'POST' &&
|
||||
strlen($_SERVER['SCRIPT_NAME']) >= 10 &&
|
||||
substr_compare($_SERVER['SCRIPT_NAME'], '/login.php', -10) === 0
|
||||
) {
|
||||
header('Location: '.$redirect_url);
|
||||
exit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user