During installation, a empty admin password should put an empty
password in configuration so admin interface is disabled.
Before this fix, a empty password would be a valid password
without disabling the admin interface.
Signed-off-by: Jerome Jutteau <j.jutteau@gmail.com>
break;
case 2:
- $cfg['admin_password'] = hash('sha256', $_POST['admin_password']);
+ if (strlen($_POST['admin_password'])) {
+ $cfg['admin_password'] = hash('sha256', $_POST['admin_password']);
+ } else {
+ $cfg['admin_password'] = '';
+ }
jirafeau_export_cfg($cfg);
break;