From unknown Fri Mar 29 05:51:59 2024 X-Loop: owner@bugs.x2go.org Subject: Bug#559: x2goclient: the local user name that is passed to x2gomountdirs command needs to be enclosed in quotation marks Reply-To: Rok Mandeljc , 559@bugs.x2go.org Resent-From: Rok Mandeljc Resent-To: x2go-dev@lists.x2go.org Resent-CC: X2Go Developers X-Loop: owner@bugs.x2go.org Resent-Date: Mon, 28 Jul 2014 20:15:01 +0000 Resent-Message-ID: Resent-Sender: owner@bugs.x2go.org X-X2Go-PR-Message: report 559 X-X2Go-PR-Package: x2goclient X-X2Go-PR-Keywords: Received: via spool by submit@bugs.x2go.org id=B.140657827521288 (code B); Mon, 28 Jul 2014 20:15:01 +0000 Received: (at submit) by bugs.x2go.org; 28 Jul 2014 20:11:15 +0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on ymir.das-netzwerkteam.de X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham version=3.3.2 Received: from mail-we0-f176.google.com (mail-we0-f176.google.com [74.125.82.176]) by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 7CD2A5DB52 for ; Mon, 28 Jul 2014 22:11:13 +0200 (CEST) Received: by mail-we0-f176.google.com with SMTP id q58so7949039wes.35 for ; Mon, 28 Jul 2014 13:11:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type; bh=2tLXrs9ymn6KN8vfbjhLpdIZeIPMJMHHsNjtP/c44SU=; b=Ud2OPIwwEQK41O6qjRrBme+HOXlRjva7++zeSBcTOJna1RNwyY1hpKTir1afpzbIzT dzNflYUgNo6+q0b0N0k1mlCM5uoHb1URJWmSack4mxl/+RtYdIhZ0L7LVCLdi2k1AxWA d/LjCiZS4dXZuZMIuwO3rK+LLNrWzXYu/UKN4hMuhtptqFERMCGdXbnMqm9cFnX0s9SV UUclQWL3OSN3wvaHrGi8kMmnIvryu1TgGb9bDXBcdDwqJLFlFZN7rczzbZhwWwCc/isx TpiGUQpX/QvoTji0HELX8z19UiTwdtDyRrb/Zdf0xFcmcmLkvEvnXfMUNJTexe8qnJXk LiDA== X-Received: by 10.180.99.102 with SMTP id ep6mr34671985wib.1.1406578272207; Mon, 28 Jul 2014 13:11:12 -0700 (PDT) Received: from [172.24.1.101] (BSN-143-119-239.dial-up.dsl.siol.net. [89.143.119.239]) by mx.google.com with ESMTPSA id lg7sm36426556wjb.9.2014.07.28.13.11.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Jul 2014 13:11:11 -0700 (PDT) Message-ID: <53D6AE5D.5010107@gmail.com> Date: Mon, 28 Jul 2014 22:11:09 +0200 From: Rok Mandeljc User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: submit@bugs.x2go.org Content-Type: multipart/mixed; boundary="------------050208050306070000040809" This is a multi-part message in MIME format. --------------050208050306070000040809 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Package: x2goclient Version: 4.0.2.1+hotfix1 In startX2goMount(), the local user name (cuser) is passed as the third argument to the x2gomountdirs command that will be executed on the server side. This user name should be enclosed in quotation marks, otherwise the x2gomountdirs on server side fails for users who are unfortunate enough to have put a whitespace character in their Windows user name. --------------050208050306070000040809 Content-Type: text/x-patch; name="0001-startX2goMount-insert-quotation-marks-around-the-loc.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-startX2goMount-insert-quotation-marks-around-the-loc.pa"; filename*1="tch" >From 8e51e6835b2935777e83adb1823a7bbd37bbede0 Mon Sep 17 00:00:00 2001 From: Rok Mandeljc Date: Mon, 28 Jul 2014 21:51:12 +0200 Subject: [PATCH] startX2goMount(): insert quotation marks around the local user name (cuser) that is passed to x2gomountdirs command Unquoted user name means that the server-side x2gomountdirs command will fail for users who are unfortunate enough to have put a whitespace character in their Windows user name. Signed-off-by: Rok Mandeljc --- onmainwindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/onmainwindow.cpp b/onmainwindow.cpp index 8acec61..7751c69 100644 --- a/onmainwindow.cpp +++ b/onmainwindow.cpp @@ -9230,11 +9230,11 @@ void ONMainWindow::startX2goMount() dirs=dirs+"__REVERSESSH_PORT__"+resumingSession.fsPort; } if ( !rem ) - cmd="export HOSTNAME && x2gomountdirs dir "+sessionId+" "+cuser+ - " "+dir->dstKey+" "+dirs; + cmd="export HOSTNAME && x2gomountdirs dir "+sessionId+" \""+cuser+ + "\" "+dir->dstKey+" "+dirs; else - cmd="export HOSTNAME && x2gomountdirs rem "+sessionId+" "+cuser+ - " "+dir->dstKey+" "+dirs; + cmd="export HOSTNAME && x2gomountdirs rem "+sessionId+" \""+cuser+ + "\" "+dir->dstKey+" "+dirs; #ifdef Q_OS_WIN -- 1.9.3 --------------050208050306070000040809--