summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2014-07-25 11:35:51 -0300
committerTomás Touceda <chiiph@leap.se>2014-07-25 11:35:51 -0300
commitdab3aea7281ecd473db2f4830c2bec0b3ccaa536 (patch)
tree73860178646e9a62dff9f48e98d7cbd28cc3f66f
parentf22d3f3950cd84c36575686c271b7d15b4dfb683 (diff)
parent8c9005e665bb7a77f91cf298f49832f663b0df67 (diff)
Merge remote-tracking branch 'refs/remotes/ivan/bug/disable-remembering' into develop
-rw-r--r--changes/disable-user-pass-remembering1
-rw-r--r--src/leap/bitmask/gui/login.py3
-rw-r--r--src/leap/bitmask/util/keyring_helpers.py10
3 files changed, 10 insertions, 4 deletions
diff --git a/changes/disable-user-pass-remembering b/changes/disable-user-pass-remembering
new file mode 100644
index 00000000..45411001
--- /dev/null
+++ b/changes/disable-user-pass-remembering
@@ -0,0 +1 @@
+- Temporarily disable username/password remembering to avoid keyring issues. Related to #4190.
diff --git a/src/leap/bitmask/gui/login.py b/src/leap/bitmask/gui/login.py
index f66e71d9..baf29c23 100644
--- a/src/leap/bitmask/gui/login.py
+++ b/src/leap/bitmask/gui/login.py
@@ -216,7 +216,8 @@ class LoginWidget(QtGui.QWidget):
"""
self.ui.lnUser.setEnabled(enabled)
self.ui.lnPassword.setEnabled(enabled)
- self.ui.chkRemember.setEnabled(enabled)
+ if has_keyring():
+ self.ui.chkRemember.setEnabled(enabled)
self.ui.cmbProviders.setEnabled(enabled)
self._set_cancel(not enabled)
diff --git a/src/leap/bitmask/util/keyring_helpers.py b/src/leap/bitmask/util/keyring_helpers.py
index ee2d7a1c..0512d988 100644
--- a/src/leap/bitmask/util/keyring_helpers.py
+++ b/src/leap/bitmask/util/keyring_helpers.py
@@ -34,6 +34,10 @@ except Exception:
# dbus socket, or stuff like that.
keyring = None
+# XXX remember password disabled right now!
+# see: https://leap.se/code/issues/4190
+keyring = None
+
logger = logging.getLogger(__name__)
@@ -46,7 +50,7 @@ def _get_keyring_with_fallback():
This is a workaround for the cases in which the keyring module chooses
an insecure keyring by default (ie, inside a virtualenv).
"""
- if not keyring:
+ if keyring is None:
return None
kr = keyring.get_keyring()
if not canuse(kr):
@@ -67,7 +71,7 @@ def has_keyring():
:rtype: bool
"""
- if not keyring:
+ if keyring is None:
return False
kr = _get_keyring_with_fallback()
return canuse(kr)
@@ -79,7 +83,7 @@ def get_keyring():
:rtype: keyringBackend or None
"""
- if not keyring:
+ if keyring is None:
return False
kr = _get_keyring_with_fallback()
return kr if canuse(kr) else None