]> git.sur5r.net Git - bacula/bacula/commitdiff
baculum: Change storing HTTP Basic passwords to hash form
authorMarcin Haba <marcin.haba@bacula.pl>
Tue, 14 Jul 2015 18:06:34 +0000 (20:06 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 13 Aug 2015 06:51:50 +0000 (08:51 +0200)
gui/baculum/protected/Class/ConfigurationManager.php
gui/baculum/protected/Pages/ConfigurationWizard.php

index f658136a460174b709a520b0fec065d8fc3c074a..0986ba5d16618e1dd2334b3107abd0d3123dbd9e 100644 (file)
@@ -159,6 +159,7 @@ class ConfigurationManager extends TModule
         */
        public function setUsersConfig($user, $password, $firstUsage = false, $oldUser = null) {
                $usersFile = Prado::getPathOfNamespace(self::USERS_FILE, '.users');
+               $password = crypt($password, base64_encode($password));
                if($firstUsage === true) {
                        $this->clearUsersConfig();
                }
index a2965527843ca8d0375740c69476b057f89bd596..29472aaac2846239e71bd10483fd001b400bbb33 100644 (file)
@@ -114,7 +114,7 @@ class ConfigurationWizard extends BaculumPage
                                $urlPrefix = $this->Application->getModule('friendly-url')->getUrlPrefix();
                                $location = sprintf("%s://%s:%s@%s:%d%s", $http_protocol, $cfgData['baculum']['login'], $cfgData['baculum']['password'], $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $urlPrefix);
                                header("Location: $location");
-                               return;
+                               exit();
                        } else { // standard version (user defined auth method)
                                $this->goToDefaultPage();
                        }