diff options
-rw-r--r-- | changes/bug_7470_fix-service-enabled-method | 1 | ||||
-rw-r--r-- | src/leap/bitmask/gui/account.py | 4 | ||||
-rw-r--r-- | src/leap/bitmask/gui/passwordwindow.py | 6 |
3 files changed, 9 insertions, 2 deletions
diff --git a/changes/bug_7470_fix-service-enabled-method b/changes/bug_7470_fix-service-enabled-method new file mode 100644 index 00000000..cc63dc57 --- /dev/null +++ b/changes/bug_7470_fix-service-enabled-method @@ -0,0 +1 @@ +- Fix bug with password change. Closes: #7470 diff --git a/src/leap/bitmask/gui/account.py b/src/leap/bitmask/gui/account.py index c941c3fa..81f96389 100644 --- a/src/leap/bitmask/gui/account.py +++ b/src/leap/bitmask/gui/account.py @@ -43,7 +43,7 @@ class Account(): return self._settings.get_enabled_services(self.domain) def is_email_enabled(self): - MX_SERVICE in self.services() + return MX_SERVICE in self.services() def is_eip_enabled(self): - EIP_SERVICE in self.services() + return EIP_SERVICE in self.services() diff --git a/src/leap/bitmask/gui/passwordwindow.py b/src/leap/bitmask/gui/passwordwindow.py index 94cf25da..219a5634 100644 --- a/src/leap/bitmask/gui/passwordwindow.py +++ b/src/leap/bitmask/gui/passwordwindow.py @@ -203,6 +203,12 @@ class PasswordWindow(QtGui.QDialog, Flashable): new_password = self.ui.new_password_lineedit.text() logger.debug("SRP password changed successfully.") + # FIXME ---- both changes need to be made atomically! + # if there is some problem changing password in soledad (for instance, + # it checks for length), any exception raised will be lost and we will + # have an inconsistent state between soledad and srp passwords. + # We need to implement rollaback. + if self.is_soledad_needed(): self._backend.soledad_change_password(new_password=new_password) else: |