[X2go-Commits] python-x2go.git - release/0.1.1.x (branch) updated: 0.1.1.5-3-g29297e6

X2go dev team git-admin at x2go.org
Tue Sep 13 11:38:59 CEST 2011


The branch, release/0.1.1.x has been updated
       via  29297e679ea9c13051bd89a037e8d260a5d4b572 (commit)
       via  18903032511f7a0865600cbb5da78fc9382db069 (commit)
      from  19db0a0ec580c83bd216c6524367c2c7646ea541 (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 29297e679ea9c13051bd89a037e8d260a5d4b572
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Tue Sep 13 11:35:47 2011 +0200

    * New upstream version (0.1.1.6), bugfix release for 0.1.1.x series:
      - Fix IPv4 enforcement for localhost connections.
      - Be tolerant against trailing whitespaces in hostnames.

commit 18903032511f7a0865600cbb5da78fc9382db069
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Tue Sep 13 11:38:18 2011 +0200

    version increment

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

Summary of changes:
 debian/changelog                 |    5 +++--
 x2go/__init__.py                 |    2 +-
 x2go/backends/control/_stdout.py |   12 +++++++++++-
 x2go/sshproxy.py                 |   21 +++++++++++++++++----
 4 files changed, 32 insertions(+), 8 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index edeac2b..2d8524e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,8 @@
 python-x2go (0.1.1.6-0~x2go1) UNRELEASED; urgency=low
 
-  * New upstream version (0.1.1.5), bugfix release for 0.1.1.x series:
-    - continue development...
+  * New upstream version (0.1.1.6), bugfix release for 0.1.1.x series:
+    - Fix IPv4 enforcement for localhost connections.
+    - Be tolerant against trailing whitespaces in hostnames.
  
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Mon, 11 Sep 2011 18:37:02 +0200
 
diff --git a/x2go/__init__.py b/x2go/__init__.py
index 31ff130..576547d 100644
--- a/x2go/__init__.py
+++ b/x2go/__init__.py
@@ -158,7 +158,7 @@ Contact
 """
 
 __NAME__    = 'python-x2go'
-__VERSION__ = '0.1.1.5'
+__VERSION__ = '0.1.1.6'
 
 from gevent import monkey
 monkey.patch_all()
diff --git a/x2go/backends/control/_stdout.py b/x2go/backends/control/_stdout.py
index 2f14082..4936189 100644
--- a/x2go/backends/control/_stdout.py
+++ b/x2go/backends/control/_stdout.py
@@ -280,6 +280,13 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient):
         Wraps around a Paramiko/SSH host key check.
 
         """
+        # trailing whitespace tolerance
+        hostname = hostname.strip()
+
+        # force into IPv4 for localhost connections
+        if hostname in ('localhost', 'localhost.localdomain'):
+            hostname = '127.0.0.1'
+
         return checkhosts.check_ssh_host_key(self, hostname, port=port)
 
     def connect(self, hostname, port=22, username='', password='', pkey=None,
@@ -389,13 +396,16 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient):
             key_filename = None
             pkey = None
 
+        # trailing whitespace tolerance in hostname
+        hostname = hostname.strip()
+
         self.logger('connecting to [%s]:%s' % (hostname, port), loglevel=log.loglevel_NOTICE)
 
         self.load_session_host_keys()
 
         _hostname = hostname
         # enforce IPv4 for localhost address
-        if _hostname == 'localhost':
+        if _hostname in ('localhost', 'localhost.localdomain'):
             _hostname = '127.0.0.1'
 
         if (key_filename and os.path.exists(os.path.normpath(key_filename))) or pkey:
diff --git a/x2go/sshproxy.py b/x2go/sshproxy.py
index dcf7f51..cd51afe 100644
--- a/x2go/sshproxy.py
+++ b/x2go/sshproxy.py
@@ -151,13 +151,18 @@ class X2goSSHProxy(paramiko.SSHClient, threading.Thread):
             self.remote_host = remote_host
             self.remote_port = int(remote_port)
 
+        # allow more trailing whitespace tolerance in hostnames
+        self.hostname = self.hostname.strip()
+        self.local_host = self.local_host.strip()
+        self.remote_host = self.remote_host.strip()
+
         # enforce IPv4 for localhost addresses!!!
         _hostname = self.hostname
-        if _hostname == 'localhost':
+        if _hostname in ('localhost', 'localhost.localdomain'):
             _hostname = '127.0.0.1'
-        if self.local_host == 'localhost':
+        if self.local_host in ('localhost', 'localhost.localdomain'):
             self.local_host = '127.0.0.1'
-        if self.remote_host == 'localhost':
+        if self.remote_host in ('localhost', 'localhost.localdomain'):
             self.remote_host = '127.0.0.1'
 
         if username is None:
@@ -230,8 +235,16 @@ class X2goSSHProxy(paramiko.SSHClient, threading.Thread):
         Wraps around a Paramiko/SSH host key check.
 
         """
+
+        # hostname rewrite for localhost, force to IPv4
+        _hostname = self.hostname
+
+        # force into IPv4 for localhost connections
+        if _hostname in ('localhost', 'localhost.localdomain'):
+            _hostname = '127.0.0.1'
+
         _valid = False
-        (_valid, _hostname, _port, _fingerprint, _fingerprint_type) = checkhosts.check_ssh_host_key(self, self.hostname, port=self.port)
+        (_valid, _hostname, _port, _fingerprint, _fingerprint_type) = checkhosts.check_ssh_host_key(self, _hostname, port=self.port)
         if not _valid and self.session_instance:
             _valid = self.session_instance.HOOK_check_host_dialog(_hostname, _port, fingerprint=_fingerprint, fingerprint_type=_fingerprint_type)
         return _valid


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