[X2Go-Commits] [python-x2go] 07/11: x2go/backends/control/plain.py: Handle password based authentication failures graceful. Uncomment previously commented out code.

git-admin at x2go.org git-admin at x2go.org
Mon Sep 25 12:44:54 CEST 2017


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository python-x2go.

commit 57114f014d6f8228589f5f54ba1058fba2295d68
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sun Sep 24 19:56:10 2017 +0200

    x2go/backends/control/plain.py: Handle password based authentication failures graceful. Uncomment previously commented out code.
---
 x2go/backends/control/plain.py | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/x2go/backends/control/plain.py b/x2go/backends/control/plain.py
index c2331e9..6d525c4 100644
--- a/x2go/backends/control/plain.py
+++ b/x2go/backends/control/plain.py
@@ -1114,19 +1114,14 @@ class X2GoControlSession(paramiko.SSHClient):
             if not password:
                 password = "".join([random.choice(string.letters+string.digits) for x in range(1, 20)])
             self.logger('performing SSH password authentication with server', loglevel=log.loglevel_DEBUG)
-            #try:
-            paramiko.SSHClient.connect(self, _hostname, port=port, username=username, password=password,
+            try:
+                paramiko.SSHClient.connect(self, _hostname, port=port, username=username, password=password,
                                            timeout=timeout, allow_agent=False, look_for_keys=False)
-            #except paramiko.AuthenticationException, e:
-            #    self.close()
-            #    if self.sshproxy_session:
-            #        self.sshproxy_session.stop_thread()
-            #    raise e
-            #except:
-            #    self.close()
-            #    if self.sshproxy_session:
-            #        self.sshproxy_session.stop_thread()
-            #    raise
+            except:
+                self.close()
+                if self.sshproxy_session:
+                    self.sshproxy_session.stop_thread()
+                raise
 
         self.set_missing_host_key_policy(paramiko.RejectPolicy())
 

--
Alioth's /srv/git/code.x2go.org/python-x2go.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/python-x2go.git


More information about the x2go-commits mailing list