[X2Go-Commits] pyhoca-gui.git - twofactorauth (branch) updated: 0.4.0.8-9-g7e92874

X2Go dev team git-admin at x2go.org
Sun Sep 15 00:50:13 CEST 2013


The branch, twofactorauth has been updated
       via  7e92874ea4b3e03afc77c1b571439555deb09ba3 (commit)
      from  d49d9ade05274a738718064b3b886dcb02833415 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7e92874ea4b3e03afc77c1b571439555deb09ba3
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sun Sep 15 00:49:58 2013 +0200

    handle NoneType passwords/passphrases

-----------------------------------------------------------------------

Summary of changes:
 pyhoca/wxgui/passphrase.py |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

The diff of changes is:
diff --git a/pyhoca/wxgui/passphrase.py b/pyhoca/wxgui/passphrase.py
index 6e3bbf1..9a3fed5 100644
--- a/pyhoca/wxgui/passphrase.py
+++ b/pyhoca/wxgui/passphrase.py
@@ -179,7 +179,15 @@ class PyHocaGUI_DialogBoxPassphrase(wx.Dialog):
             passphrase = sshproxy_passphrase = self.passphraseTxt.GetValue()
         else:
             passphrase = self.passphraseTxt.GetValue()
-            sshproxy_passphrase = base64.b64decode(self.sshproxy_passphrase)
+            try:
+                sshproxy_passphrase = base64.b64decode(self.sshproxy_passphrase)
+            except TypeError:
+                sshproxy_passphrase = None
+
+        try:
+            b64_passphrase = base64.b64encode(passphrase)
+        except TypeError:
+            b64_passphrase = None
 
         connect_failed = False
 
@@ -209,7 +217,7 @@ class PyHocaGUI_DialogBoxPassphrase(wx.Dialog):
                 except KeyError:
                     pass
                 self._pyhoca_logger('SSH private key file is encrypted and requires a passphrase', loglevel=x2go.log.loglevel_INFO, )
-                _passphrase_window = PyHocaGUI_DialogBoxPassphrase(self._PyHocaGUI, self.current_profile_name, caller=self, sshproxy_passphrase=base64.b64encode(passphrase), key_filename=key_filename)
+                _passphrase_window = PyHocaGUI_DialogBoxPassphrase(self._PyHocaGUI, self.current_profile_name, caller=self, sshproxy_passphrase=b64_passphrase, key_filename=key_filename)
                 self._PyHocaGUI._logon_windows[self.current_profile_name] = _passphrase_window
 
             else:


hooks/post-receive
-- 
pyhoca-gui.git (Python X2Go Client (wxPython GUI))

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "pyhoca-gui.git" (Python X2Go Client (wxPython GUI)).




More information about the x2go-commits mailing list