diff options
author | Simon Rettberg | 2014-12-02 19:22:48 +0100 |
---|---|---|
committer | Simon Rettberg | 2014-12-02 19:22:48 +0100 |
commit | ba2a49e9875eda489385e370bb9f2259779caa7b (patch) | |
tree | 2654d7b4a6bf99d584e146f7708c75a5b8beaeac /modules/serversetup.inc.php | |
parent | Fix wrong event type when displaying event log (diff) | |
download | slx-admin-ba2a49e9875eda489385e370bb9f2259779caa7b.tar.gz slx-admin-ba2a49e9875eda489385e370bb9f2259779caa7b.tar.xz slx-admin-ba2a49e9875eda489385e370bb9f2259779caa7b.zip |
Tweaks and fixes
Diffstat (limited to 'modules/serversetup.inc.php')
-rw-r--r-- | modules/serversetup.inc.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/serversetup.inc.php b/modules/serversetup.inc.php index 93d373c1..37868308 100644 --- a/modules/serversetup.inc.php +++ b/modules/serversetup.inc.php @@ -125,9 +125,11 @@ class Page_ServerSetup extends Page $this->currentMenu['defaultentry'] = Request::post('defaultentry', 'net'); $this->currentMenu['timeout'] = $timeout; $this->currentMenu['custom'] = Request::post('custom', ''); - $this->currentMenu['masterpassword'] = Request::post('masterpassword', ''); - if (!preg_match('/^\$[1456]\$.+\$/', $this->currentMenu['masterpassword'])) - $this->currentMenu['masterpassword'] = Crypto::hash6($this->currentMenu['masterpassword']); + $this->currentMenu['masterpasswordclear'] = Request::post('masterpassword', ''); + if (empty($this->currentMenu['masterpasswordclear'])) + $this->currentMenu['masterpassword'] = 'invalid'; + else + $this->currentMenu['masterpassword'] = Crypto::hash6($this->currentMenu['masterpasswordclear']); Property::setBootMenu($this->currentMenu); $id = Trigger::ipxe(); Util::redirect('?do=ServerSetup&taskid=' . $id); |