From 978cbcc4c124fe3dcf05283d0790b828e072be25 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Fri, 18 Sep 2015 13:27:37 -0400 Subject: [bug] correctly return expected value for methods that check services these methods were returning None, and therefore breaking soledad password change (since it checks whether mail is enabled before changing soledad pass after srp pass change). - Resolves: #7470 --- src/leap/bitmask/gui/passwordwindow.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/leap/bitmask/gui/passwordwindow.py') 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: -- cgit v1.2.3 From 68b9e59d695ae896e405fd5f98eb2953dd5c9a2e Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Fri, 18 Sep 2015 16:29:48 -0300 Subject: [bug] track soledad ready state on a shared place Connecting to the `soledad_bootstrap_finished` signal is not enough since the password change window is created after the signal is emitted, that way we were not able to tell when soledad is ready to be used. - Resolves: #7474 --- src/leap/bitmask/gui/passwordwindow.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/leap/bitmask/gui/passwordwindow.py') diff --git a/src/leap/bitmask/gui/passwordwindow.py b/src/leap/bitmask/gui/passwordwindow.py index 219a5634..d9309b2f 100644 --- a/src/leap/bitmask/gui/passwordwindow.py +++ b/src/leap/bitmask/gui/passwordwindow.py @@ -71,9 +71,10 @@ class PasswordWindow(QtGui.QDialog, Flashable): self.ui.cancel_button.setEnabled(True) self.flash_error(self.tr("Please log in to change your password.")) - if self.is_soledad_needed() and not self._soledad_ready: + if self.is_soledad_needed() and not self.app.soledad_started: self._enable_password_widgets(False) self.ui.cancel_button.setEnabled(True) + self.flash_message( self.tr("Please wait for data storage to be ready.")) @@ -146,7 +147,6 @@ class PasswordWindow(QtGui.QDialog, Flashable): sig.soledad_password_change_error.connect( self._soledad_change_password_problem) - self._soledad_ready = False sig.soledad_bootstrap_finished.connect(self._on_soledad_ready) def _change_password(self): @@ -269,4 +269,3 @@ class PasswordWindow(QtGui.QDialog, Flashable): Signaler.soledad_bootstrap_finished """ self._enable_password_widgets(True) - self._soledad_ready = True -- cgit v1.2.3 From 262a9a750a573ae6003ebf19d5a1867bc19d28c0 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Mon, 21 Sep 2015 16:48:13 -0300 Subject: [bug] fix typo on backend name --- src/leap/bitmask/gui/passwordwindow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/leap/bitmask/gui/passwordwindow.py') diff --git a/src/leap/bitmask/gui/passwordwindow.py b/src/leap/bitmask/gui/passwordwindow.py index d9309b2f..dedfcb10 100644 --- a/src/leap/bitmask/gui/passwordwindow.py +++ b/src/leap/bitmask/gui/passwordwindow.py @@ -210,7 +210,7 @@ class PasswordWindow(QtGui.QDialog, Flashable): # We need to implement rollaback. if self.is_soledad_needed(): - self._backend.soledad_change_password(new_password=new_password) + self.app.backend.soledad_change_password(new_password=new_password) else: self._change_password_success() -- cgit v1.2.3