diff --git a/bureau/admin/login.php b/bureau/admin/login.php index 332098c7..82e5ca72 100644 --- a/bureau/admin/login.php +++ b/bureau/admin/login.php @@ -28,18 +28,6 @@ ---------------------------------------------------------------------- */ -// For people who want to authenticate with HTTP AUTH -if (isset($_GET['http_auth'])) $http_auth=strval($_GET['http_auth']); -if ($http_auth) { - if (empty($_SERVER['PHP_AUTH_USER']) || empty($_SERVER['PHP_AUTH_PW'])) { - header('WWW-Authenticate: Basic realm="Test Authentication System"'); - header('HTTP/1.0 401 Unauthorized'); - } else { - // Gruiiik - $_REQUEST["username"]=$_SERVER['PHP_AUTH_USER']; - $_REQUEST["password"]=$_SERVER['PHP_AUTH_PW']; - } -} require_once("../class/config.php"); diff --git a/bureau/class/config.php b/bureau/class/config.php index b85f7914..4f36cb16 100644 --- a/bureau/class/config.php +++ b/bureau/class/config.php @@ -62,6 +62,22 @@ if (ini_get("safe_mode")) { exit(); } +// For people who want to authenticate with HTTP AUTH +if (isset($_GET['http_auth'])) $http_auth=strval($_GET['http_auth']); +if ($http_auth) { + if (empty($_SERVER['PHP_AUTH_USER']) || empty($_SERVER['PHP_AUTH_PW'])) { + header('WWW-Authenticate: Basic realm="Test Authentication System"'); + header('HTTP/1.0 401 Unauthorized'); + exit(); + } + } +if (!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) { + // Gruiiik + $_REQUEST["username"]=$_SERVER['PHP_AUTH_USER']; + $_REQUEST["password"]=$_SERVER['PHP_AUTH_PW']; + } + + $help_baseurl="http://www.aide-alternc.org/"; /* PHPLIB inclusions : */