[X2Go-Commits] python-x2go.git - twofactorauth (branch) updated: 0.4.0.8-21-g2e44144

X2Go dev team git-admin at x2go.org
Wed Oct 9 21:00:58 CEST 2013


The branch, twofactorauth has been updated
       via  2e441444735e8fe81627e315b2d10bd09d1cad60 (commit)
      from  97d719a9381976c7878ecb95b9292b78366e2608 (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 2e441444735e8fe81627e315b2d10bd09d1cad60
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Wed Oct 9 21:00:42 2013 +0200

    Warn about Parmiko/SSH versions that do not yet support twofactor authentication with password/passphrase being different.

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

Summary of changes:
 debian/changelog                 |    2 ++
 x2go/backends/control/_stdout.py |    8 ++++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 017ae15..8aa3264 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -18,6 +18,8 @@ python-x2go (0.4.0.9-0~x2go1) UNRELEASED; urgency=low
     - Compat fix in _paramiko monkey patch module to also work with early Paramiko
       versions.
     - No Unicode chars in log messages. Eliminated one more in checkhosts.py.
+    - Warn about Parmiko/SSH versions that do not yet support twofactor
+      authentication with password/passphrase being different.
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Wed, 07 Aug 2013 12:18:46 +0200
 
diff --git a/x2go/backends/control/_stdout.py b/x2go/backends/control/_stdout.py
index e72b9ee..e151254 100644
--- a/x2go/backends/control/_stdout.py
+++ b/x2go/backends/control/_stdout.py
@@ -798,6 +798,7 @@ class X2GoControlSessionSTDOUT(paramiko.SSHClient):
             key_filename = None
             pkey = None
 
+        _twofactorauth = False
         if not passphrase: passphrase = password
 
         if use_sshproxy and sshproxy_host and sshproxy_user:
@@ -894,6 +895,7 @@ class X2GoControlSessionSTDOUT(paramiko.SSHClient):
                 self.close()
                 if type(e) == paramiko.SSHException and not str(e).startswith('Two-factor authentication requires a password'):
                     self.logger('X2Go Server requests two-factor authentication', loglevel=log.loglevel_NOTICE)
+                    _twofactorauth = True
                     raise e
                 if passphrase:
                     self.logger('unlock SSH private key file with provided password', loglevel=log.loglevel_INFO)
@@ -906,7 +908,8 @@ class X2GoControlSessionSTDOUT(paramiko.SSHClient):
                                                            key_filename=key_filename, timeout=timeout, allow_agent=False,
                                                            look_for_keys=False)
                             except TypeError:
-                                self.logger('your version of Paramiko/SSH does not support authentication workflows which require SSH key decryption in combination with two-factor authentication', loglevel=log.loglevel_NOTICE)
+                                if _twofactorauth:
+                                    self.logger('your version of Paramiko/SSH does not support authentication workflows which require SSH key decryption in combination with two-factor authentication', loglevel=log.loglevel_NOTICE)
                                 paramiko.SSHClient.connect(self, _hostname, port=port, username=username, password=password, pkey=pkey,
                                                            key_filename=key_filename, timeout=timeout, allow_agent=False,
                                                            look_for_keys=False)
@@ -917,7 +920,8 @@ class X2GoControlSessionSTDOUT(paramiko.SSHClient):
                                                            key_filename=None, timeout=timeout, allow_agent=allow_agent,
                                                            look_for_keys=look_for_keys)
                             except TypeError:
-                                self.logger('your version of Paramiko/SSH does not support authentication workflows which require SSH key decryption in combination with two-factor authentication', loglevel=log.loglevel_NOTICE)
+                                if _twofactorauth:
+                                    self.logger('your version of Paramiko/SSH does not support authentication workflows which require SSH key decryption in combination with two-factor authentication', loglevel=log.loglevel_NOTICE)
                                 paramiko.SSHClient.connect(self, _hostname, port=port, username=username, password=password, pkey=None,
                                                            key_filename=None, timeout=timeout, allow_agent=allow_agent,
                                                            look_for_keys=look_for_keys)


hooks/post-receive
-- 
python-x2go.git (Python X2Go Client API)

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 "python-x2go.git" (Python X2Go Client API).




More information about the x2go-commits mailing list