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

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

commit 2ec9567f7dac9fa0edc02f36efcc4a701acaf52f
Author: nounce <nou...@posteo.net>
Date:   Mon Jan 8 21:37:26 2024 +0100

    x2go/{backends/control/plain,sshproxy}.py: Don't let look_for_keys override 
specified private key. The specified private key should win.
---
 x2go/backends/control/plain.py | 6 +++---
 x2go/sshproxy.py               | 7 +++----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/x2go/backends/control/plain.py b/x2go/backends/control/plain.py
index 955b8d1..8cc0aef 100644
--- a/x2go/backends/control/plain.py
+++ b/x2go/backends/control/plain.py
@@ -938,9 +938,9 @@ class X2GoControlSession(paramiko.SSHClient):
         if forward_sshagent is None:
             forward_sshagent = self.forward_sshagent
 
-        if look_for_keys:
-            key_filename = None
-            pkey = None
+        # Do not look for keys if there is one supplied already
+        if key_filename or pkey:
+            look_for_keys = False
 
         _twofactorauth = False
         if password and (passphrase is None) and not force_password_auth: 
passphrase = password
diff --git a/x2go/sshproxy.py b/x2go/sshproxy.py
index e7dc230..0b6d283 100644
--- a/x2go/sshproxy.py
+++ b/x2go/sshproxy.py
@@ -208,10 +208,9 @@ class X2GoSSHProxy(paramiko.SSHClient, threading.Thread):
         self.local_host = self.local_host.strip()
         self.remote_host = self.remote_host.strip()
 
-        # do not use explicitly given keys if look_for_keys has got activated
-        if look_for_keys:
-            key_filename = None
-            pkey = None
+        # Do not look for keys if there is one supplied already
+        if key_filename or pkey:
+            look_for_keys = False
 
         if key_filename and "~" in key_filename:
             key_filename = os.path.expanduser(key_filename)

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on 
/srv/git/code.x2go.org/python-x2go.git
_______________________________________________
x2go-commits mailing list
x2go-commits@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-commits

Reply via email to