This commit is contained in:
Marius
2021-08-11 18:54:38 +02:00
parent 9e1ebdbb1e
commit 38fef88f5e

View File

@@ -495,10 +495,14 @@ function login() {
$txt = Date('Y-m-d\TH:i',time()) . ' ' . $USERS[$_SERVER['PHP_AUTH_USER']];
file_put_contents('logins.txt', $txt.PHP_EOL , FILE_APPEND | LOCK_EX);
} else {
header('HTTP/1.1 401 Authorization Required');
header('WWW-Authenticate: Basic realm="Access denied"');
echo 'Check your pw ' . $_SERVER['PHP_AUTH_PW'] . ' ' . $pw;
exit;
}
} else {
header('HTTP/1.1 401 Authorization Required');
header('WWW-Authenticate: Basic realm="Access denied"');
echo 'User not found ' . $_SERVER['PHP_AUTH_USER'];
exit;
}