summaryrefslogtreecommitdiff
path: root/plugins/password
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/password')
-rw-r--r--plugins/password/config.inc.php.dist4
-rw-r--r--plugins/password/password.php2
2 files changed, 5 insertions, 1 deletions
diff --git a/plugins/password/config.inc.php.dist b/plugins/password/config.inc.php.dist
index 87758d84f..9256829aa 100644
--- a/plugins/password/config.inc.php.dist
+++ b/plugins/password/config.inc.php.dist
@@ -31,6 +31,10 @@ $rcmail_config['password_login_exceptions'] = null;
//$rcmail_config['password_hosts'] = array('mail.example.com', 'mail2.example.org');
$rcmail_config['password_hosts'] = null;
+// Enables saving the new password even if it matches the old password. Useful
+// for upgrading the stored passwords after the encryption scheme has changed.
+$rcmail_config['password_force_save'] = false;
+
// SQL Driver options
// ------------------
diff --git a/plugins/password/password.php b/plugins/password/password.php
index 39020a0bf..e16b4d0b9 100644
--- a/plugins/password/password.php
+++ b/plugins/password/password.php
@@ -147,7 +147,7 @@ class password extends rcube_plugin
$rcmail->output->command('display_message', $this->gettext('passwordweak'), 'error');
}
// password is the same as the old one, do nothing, return success
- else if ($sespwd == $newpwd) {
+ else if ($sespwd == $newpwd && !$rcmail->config->get('password_force_save')) {
$rcmail->output->command('display_message', $this->gettext('successfullysaved'), 'confirmation');
}
// try to save the password