]> git.sur5r.net Git - bacula/bacula/commitdiff
baculum: Support for web servers which do not provide direct info about HTTP Basic...
authorMarcin Haba <marcin.haba@bacula.pl>
Mon, 23 Jun 2014 12:28:47 +0000 (14:28 +0200)
committerMarcin Haba <marcin.haba@bacula.pl>
Mon, 23 Jun 2014 12:28:47 +0000 (14:28 +0200)
gui/baculum/index.php

index f6bfcd80e201d8d0178a9d113cfd329664bf5a53..41881b4f50ede8cb24783e8da4429b919a470b4c 100644 (file)
  * Bacula® is a registered trademark of Kern Sibbald.
  */
 date_default_timezone_set('UTC');
+
+// Support for web servers which do not provide direct info about HTTP Basic auth to PHP superglobal $_SERVER array.
+if(!isset($_SERVER['PHP_AUTH_USER']) && !isset($_SERVER['PHP_AUTH_PW'])) {
+    list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));
+}
+
 require_once('./protected/Pages/Requirements.php');
 new Requirements(__DIR__);
 require_once('./framework/prado.php');