Defined $encrypted_password

pull/403/head
TimZ99 2018-08-03 01:35:26 +02:00
parent ce8182e32f
commit 5e61d89b7f
No known key found for this signature in database
GPG Key ID: 4D8268DC68E8339D
1 changed files with 3 additions and 3 deletions

View File

@ -239,6 +239,9 @@ class ServerController extends AbstractServerController {
return $this->executeIndex(); return $this->executeIndex();
} }
// We need the server id to encrypt the password. Encryption will be done after the server is added
$encrypted_password = '';
if (!empty($_POST['website_password'])) { if (!empty($_POST['website_password'])) {
$new_password = psm_POST('website_password'); $new_password = psm_POST('website_password');
@ -251,9 +254,6 @@ class ServerController extends AbstractServerController {
} else { } else {
$encrypted_password = psm_password_encrypt(strval($this->server_id).psm_get_conf('password_encrypt_key'), $new_password); $encrypted_password = psm_password_encrypt(strval($this->server_id).psm_get_conf('password_encrypt_key'), $new_password);
} }
} else {
// We need the server id to encrypt the password. Encryption will be done after the server is added
$encrypted_password = '';
} }
} }