Subject: Bug#1446: Domain name issues with client 4.1.2.2 when using HTTP broker

From: Mark Hymers <[email-masked]>
Date: Thu, 19 Mar 2020 20:03:00 +0000

Package: x2goclient
Version: 4.1.2.2

Hi,

We have an x2go deployment using the HTTP broker and multiple backend 
x2go servers.

We have found that if users use 4.1.2.2, when sessions are resumed the 
system tries to connect to the hostname without the domainname attached. 
   I.e. system1 instead of system1.example.org.  This is not a problem 
with 4.1.2.1 or earlier client releases (no server changes were made).

I have tracked this down to a change in session handling in 
resumeSession in src/httpbrokerclient.cpp.

In this function, config->serverIp is set to server which, at this point 
only contains the hostname, not the FQDN.  config->serverIp has already 
been set at this point by the parseSession function on line 700 (current 
git HEAD):

config->serverIp=words[0];

This version of config->serverIp is the proper FQDN.

To fix this, I just removed the overriding of serverIp in the 
resumeSession function (see attached patch) but I'm not sure if this is 
fully correct; presumably there was a reason for setting it in 
resumeSession.

Thanks,

Mark

-- 
Mark Hymers, Lecturer in Neuroimaging Methods
York NeuroImaging Centre and Department of Psychology
University of York, UK

Please note that my email address is: [email-masked]
Responses to messages sent to other addresses may be delayed

diff --git a/src/httpbrokerclient.cpp b/src/httpbrokerclient.cpp
index 2589f5f..bfcaac1 100644
--- a/src/httpbrokerclient.cpp
+++ b/src/httpbrokerclient.cpp
@@ -725,7 +725,6 @@ void HttpBrokerClient::resumeSession(const QString& id, const QString& server)
         if(sline.indexOf(id)!=-1)
         {
             config->sessiondata=sline;
-            config->serverIp=server;
             emit sessionSelected();
             break;
         }