$_SERVER['PHP_AUTH_PW'] isn't always sent
This commit is contained in:
committed by
Nachtzuster
parent
0faf2db6a2
commit
ef86658b6b
+1
-1
@@ -66,7 +66,7 @@ function get_service_mount_name() {
|
|||||||
|
|
||||||
function is_authenticated() {
|
function is_authenticated() {
|
||||||
$ret = false;
|
$ret = false;
|
||||||
if (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) {
|
if (isset($_SERVER['PHP_AUTH_USER'])) {
|
||||||
$config = get_config();
|
$config = get_config();
|
||||||
$ret = ($_SERVER['PHP_AUTH_PW'] == $config['CADDY_PWD'] && $_SERVER['PHP_AUTH_USER'] == 'birdnet');
|
$ret = ($_SERVER['PHP_AUTH_PW'] == $config['CADDY_PWD'] && $_SERVER['PHP_AUTH_USER'] == 'birdnet');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user