This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2goclient. from b30480a5 Merge branch 'personal/sunweaver/add-Jenkinsfile' into 'master' new c265f62c debian/changelog: fixup. new e51da1ba src/httpbrokerclient.cpp: handle missing server name/address gracefully. new 10fc1165 src/httpbrokerclient.cpp: parse port value (if provided) and handle errors gracefully. new 3fb27564 Merge branch 'personal/Ionic/bugfix/broker-server-name-port-parsing' into 'master' The 4 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/changelog | 7 +++++-- src/httpbrokerclient.cpp | 28 ++++++++++++++++++++++++++-- 2 files changed, 31 insertions(+), 4 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goclient. commit c265f62c4a34adf1ea6dcbed8dbebb690a415d47 Author: Mihai Moldovan <ionic@ionic.de> Date: Tue Apr 30 21:47:20 2024 +0200 debian/changelog: fixup. --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 97b53dd1..cf58cc64 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,10 +3,10 @@ x2goclient (4.1.2.4-0x2go1) UNRELEASED; urgency=medium [ Oleksandr Shneyder ] * New upstream version (4.1.2.4): - Fix crashes when syn reply arriving after the session is started, when - using broker + using broker. - In direct RDP mode, when using broker, forward username and password to the RDP client if user entered any. - * Fix crashes in broker mode when server key check has failed + - Fix crashes in broker mode when server key check has failed. [ Mihai Moldovan ] * New upstream version (4.1.2.4): -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goclient. commit e51da1ba3685d8808c97d0ec13f98215e8176520 Author: Mihai Moldovan <ionic@ionic.de> Date: Tue Apr 30 21:48:43 2024 +0200 src/httpbrokerclient.cpp: handle missing server name/address gracefully. --- debian/changelog | 1 + src/httpbrokerclient.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index cf58cc64..36bb3eb7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,7 @@ x2goclient (4.1.2.4-0x2go1) UNRELEASED; urgency=medium [ Mihai Moldovan ] * New upstream version (4.1.2.4): + - src/httpbrokerclient.cpp: handle missing server name/address gracefully. * x2goclient.spec: + Add Recommends: x2gokdriveclient for FC30+, RH 8+, *SuSE 15.4+. diff --git a/src/httpbrokerclient.cpp b/src/httpbrokerclient.cpp index fda4cf3e..db05546a 100644 --- a/src/httpbrokerclient.cpp +++ b/src/httpbrokerclient.cpp @@ -840,7 +840,14 @@ void HttpBrokerClient::parseSession(QString sinfo) config->key=sinfo.mid(keyStartPos, keyEndPos+endStr.length()-keyStartPos); } QString serverLine=(lst[1].split("\n"))[0]; - QStringList words=serverLine.split(":",QString::SkipEmptyParts); + QStringList words=serverLine.split(":",QString::KeepEmptyParts); + if ((words.isEmpty ()) || (words[0].isEmpty ())) { + QString msg = tr ("Broker passed no server name or address."); + x2goDebug << msg; + QMessageBox::critical (0, tr ("Error"), msg); + emit (fatalHttpError ()); + return; + } config->serverIp=words[0]; if (words.count()>1) config->sshport=words[1]; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goclient. commit 10fc1165edd8ae7bb946ad914a4bcd6da20a08d6 Author: Mihai Moldovan <ionic@ionic.de> Date: Tue Apr 30 21:50:06 2024 +0200 src/httpbrokerclient.cpp: parse port value (if provided) and handle errors gracefully. --- debian/changelog | 2 ++ src/httpbrokerclient.cpp | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 36bb3eb7..3e218e7f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,8 @@ x2goclient (4.1.2.4-0x2go1) UNRELEASED; urgency=medium [ Mihai Moldovan ] * New upstream version (4.1.2.4): - src/httpbrokerclient.cpp: handle missing server name/address gracefully. + - src/httpbrokerclient.cpp: parse port value (if provided) and handle + errors gracefully. * x2goclient.spec: + Add Recommends: x2gokdriveclient for FC30+, RH 8+, *SuSE 15.4+. diff --git a/src/httpbrokerclient.cpp b/src/httpbrokerclient.cpp index db05546a..889f9827 100644 --- a/src/httpbrokerclient.cpp +++ b/src/httpbrokerclient.cpp @@ -849,8 +849,25 @@ void HttpBrokerClient::parseSession(QString sinfo) return; } config->serverIp=words[0]; - if (words.count()>1) + /* + * Note that it's legal for the port to be empty - the default port will + * be used in this case. + */ + if ((1 < words.count ()) && (!(words[1].isEmpty ()))) { + /* + * Sanity check, must be in the [1,65535] range. + */ + bool conv_res = false; + qulonglong conv = words[1].toULongLong (&conv_res, 10); + if ((!(conv_res)) || (conv == 0) || (65535 < conv)) { + QString msg = tr ("Broker passed invalid server port: %1").arg (words[1]); + x2goDebug << msg; + QMessageBox::critical (0, tr ("Error"), msg); + emit (fatalHttpError ()); + return; + } config->sshport=words[1]; + } x2goDebug<<"Server IP address: "<<config->serverIp; x2goDebug<<"Server port: "<<config->sshport; if (sinfo.indexOf("SESSION_INFO")!=-1) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goclient. commit 3fb27564b808847ed5b5c1d5297a2ae44cf75b28 Merge: b30480a5 10fc1165 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Thu Jun 20 19:41:57 2024 +0000 Merge branch 'personal/Ionic/bugfix/broker-server-name-port-parsing' into 'master' Handle missing or invalid broker server name/address and port gracefully. Attributes GL MR !3: https://gitlab.x2go.org/x2go/client/x2goclient/-/merge_requests/3 debian/changelog | 7 +++++-- src/httpbrokerclient.cpp | 28 ++++++++++++++++++++++++++-- 2 files changed, 31 insertions(+), 4 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git