diff --git a/controller/internalcontroller.php b/controller/internalcontroller.php index 176c71bc..74a98ada 100644 --- a/controller/internalcontroller.php +++ b/controller/internalcontroller.php @@ -91,12 +91,12 @@ class InternalController extends ApiController { */ public function getSettings() { $settings = array( - 'link_sharing_enabled' => $this->config->getAppValue('passman', 'link_sharing_enabled', 1), - 'user_sharing_enabled' => $this->config->getAppValue('passman', 'user_sharing_enabled', 1), - 'vault_key_strength' => $this->config->getAppValue('passman', 'vault_key_strength', 3), - 'check_version' => $this->config->getAppValue('passman', 'check_version', 1), - 'https_check' => $this->config->getAppValue('passman', 'https_check', 1), - 'disable_contextmenu' => $this->config->getAppValue('passman', 'disable_contextmenu', 1), + 'link_sharing_enabled' => intval($this->config->getAppValue('passman', 'link_sharing_enabled', 1)), + 'user_sharing_enabled' => intval($this->config->getAppValue('passman', 'user_sharing_enabled', 1)), + 'vault_key_strength' => intval($this->config->getAppValue('passman', 'vault_key_strength', 3)), + 'check_version' => intval($this->config->getAppValue('passman', 'check_version', 1)), + 'https_check' => intval($this->config->getAppValue('passman', 'https_check', 1)), + 'disable_contextmenu' => intval($this->config->getAppValue('passman', 'disable_contextmenu', 1)), ); return new JSONResponse($settings); } diff --git a/js/settings-admin.js b/js/settings-admin.js index e84bd50f..4adb8bb1 100644 --- a/js/settings-admin.js +++ b/js/settings-admin.js @@ -117,5 +117,8 @@ $(document).ready(function () { $('#passman_link_sharing_enabled').change(function () { settings.setAdminKey('link_sharing_enabled', ($(this).is(":checked")) ? 1 : 0); }); + $('#vault_key_strength').change(function () { + settings.setAdminKey('vault_key_strength', $(this).val()); + }); }); diff --git a/templates/settings-admin.php b/templates/settings-admin.php index 9a3e8c0a..5642a9d0 100644 --- a/templates/settings-admin.php +++ b/templates/settings-admin.php @@ -85,16 +85,16 @@ if ($checkVersion) {