This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2goclient. from 89105aa Fix quotes when calling remote commands via SSH. Use single backslash to quote quotation marks. (Fixes: #720). new 1996489 Revert "Fix quotes when calling remote commands via SSH. Use single backslash to quote quotation marks. (Fixes: #720)." new a86676d Fix quotes when calling remote commands via SSH (esp. allow same quoting/ escaping style for libssh and openSSH+Krb based connections). (Fixes: #720). The 2 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 | 4 ++-- onmainwindow.cpp | 9 +-------- 2 files changed, 3 insertions(+), 10 deletions(-) -- Alioth's /srv/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 1996489ed6788edff701cf8ad7c8cd5d3071876b Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Jan 9 21:39:58 2015 +0100 Revert "Fix quotes when calling remote commands via SSH. Use single backslash to quote quotation marks. (Fixes: #720)." This reverts commit 89105aa63ae77a40327fa680bc71e852957911c5. --- debian/changelog | 2 -- httpbrokerclient.cpp | 4 ++-- sshmasterconnection.cpp | 2 +- sshprocess.cpp | 4 ++-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index f16eca7..3e67cf4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -26,8 +26,6 @@ x2goclient (4.0.3.2-0x2go1) UNRELEASED; urgency=medium - Fix string concatenation/layout of error message when tunnel I/O errors occur. - Improve debugging/logging the SSH connections made by X2Go Client. - - Fix quotes when calling remote commands via SSH. Use single backslash - to quote quotation marks. (Fixes: #720). [ Jason Alavaliant ] * New upstream verson (4.0.3.2): diff --git a/httpbrokerclient.cpp b/httpbrokerclient.cpp index 5f009d4..736f5e7 100644 --- a/httpbrokerclient.cpp +++ b/httpbrokerclient.cpp @@ -302,10 +302,10 @@ void HttpBrokerClient::selectUserSession(const QString& session) else { if (nextAuthId.length() > 0) { - sshConnection->executeCommand ( config->sshBrokerBin+" --user "+ brokerUser +" --authid "+nextAuthId+ " --task selectsession --sid \""+session+"\"", + sshConnection->executeCommand ( config->sshBrokerBin+" --user "+ brokerUser +" --authid "+nextAuthId+ " --task selectsession --sid \\\""+session+"\\\"", this,SLOT ( slotSelectSession(bool,QString,int))); } else { - sshConnection->executeCommand ( config->sshBrokerBin+" --user "+ brokerUser +" --task selectsession --sid \""+session+"\"", + sshConnection->executeCommand ( config->sshBrokerBin+" --user "+ brokerUser +" --task selectsession --sid \\\""+session+"\\\"", this,SLOT ( slotSelectSession(bool,QString,int))); } } diff --git a/sshmasterconnection.cpp b/sshmasterconnection.cpp index b09f04f..9ad8c1f 100755 --- a/sshmasterconnection.cpp +++ b/sshmasterconnection.cpp @@ -1139,7 +1139,7 @@ bool SshMasterConnection::userAuthKrb() QUuid uuid = QUuid::createUuid(); QString uuidStr = uuid.toString().mid(1, 36).toLower(); - QString shcmd = "sh -c 'echo X2GODATABEGIN:" + uuidStr + "; whoami; echo X2GODATAEND:" + uuidStr +";'"; + QString shcmd = " echo X2GODATABEGIN:" + uuidStr + "; whoami; echo X2GODATAEND:" + uuidStr ; #ifdef Q_OS_WIN sshCmd="plink -batch "+user+"@"+host+" -P "+ diff --git a/sshprocess.cpp b/sshprocess.cpp index f605eb9..451425f 100755 --- a/sshprocess.cpp +++ b/sshprocess.cpp @@ -190,7 +190,7 @@ void SshProcess::startNormal(const QString& cmd) // #endif if(!masterCon->useKerberos()) { - QString shcmd = "sh -c 'echo X2GODATABEGIN:" + uuidStr + "; PATH=/usr/local/bin:/usr/bin:/bin "+cmd+"; echo X2GODATAEND:" + uuidStr +";'"; + QString shcmd = "sh -c \"echo X2GODATABEGIN:" + uuidStr + "; PATH=/usr/local/bin:/usr/bin:/bin "+cmd+"; echo X2GODATAEND:" + uuidStr +"\";"; masterCon->addChannelConnection(this, uuidStr, shcmd); connect(masterCon,SIGNAL(stdOut(SshProcess*,QByteArray)),this,SLOT(slotStdOut(SshProcess*,QByteArray))); connect(masterCon,SIGNAL(channelClosed(SshProcess*,QString)), this,SLOT(slotChannelClosed(SshProcess*,QString))); @@ -198,7 +198,7 @@ void SshProcess::startNormal(const QString& cmd) else { QString host=masterCon->getHost(); - QString shcmd = "sh -c 'echo X2GODATABEGIN:" + uuidStr + "; PATH=/usr/local/bin:/usr/bin:/bin "+cmd+"; echo X2GODATAEND:" + uuidStr +";'"; + QString shcmd = "echo X2GODATABEGIN:" + uuidStr + "; PATH=/usr/local/bin:/usr/bin:/bin "+cmd+"; echo X2GODATAEND:" + uuidStr; proc=new QProcess(this); #ifdef Q_OS_WIN if(masterCon->get_kerberosDelegation()) -- Alioth's /srv/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 a86676d05d21c91700500dea0f84a08b006cbfa7 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Jan 9 21:41:46 2015 +0100 Fix quotes when calling remote commands via SSH (esp. allow same quoting/ escaping style for libssh and openSSH+Krb based connections). (Fixes: #720). --- debian/changelog | 2 ++ httpbrokerclient.cpp | 4 ++-- onmainwindow.cpp | 9 +-------- sshmasterconnection.cpp | 2 +- sshprocess.cpp | 4 ++-- 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3e67cf4..21e06c5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -26,6 +26,8 @@ x2goclient (4.0.3.2-0x2go1) UNRELEASED; urgency=medium - Fix string concatenation/layout of error message when tunnel I/O errors occur. - Improve debugging/logging the SSH connections made by X2Go Client. + - Fix quotes when calling remote commands via SSH (esp. allow same quoting/ + escaping style for libssh and openSSH+Krb based connections). (Fixes: #720). [ Jason Alavaliant ] * New upstream verson (4.0.3.2): diff --git a/httpbrokerclient.cpp b/httpbrokerclient.cpp index 736f5e7..5f009d4 100644 --- a/httpbrokerclient.cpp +++ b/httpbrokerclient.cpp @@ -302,10 +302,10 @@ void HttpBrokerClient::selectUserSession(const QString& session) else { if (nextAuthId.length() > 0) { - sshConnection->executeCommand ( config->sshBrokerBin+" --user "+ brokerUser +" --authid "+nextAuthId+ " --task selectsession --sid \\\""+session+"\\\"", + sshConnection->executeCommand ( config->sshBrokerBin+" --user "+ brokerUser +" --authid "+nextAuthId+ " --task selectsession --sid \""+session+"\"", this,SLOT ( slotSelectSession(bool,QString,int))); } else { - sshConnection->executeCommand ( config->sshBrokerBin+" --user "+ brokerUser +" --task selectsession --sid \\\""+session+"\\\"", + sshConnection->executeCommand ( config->sshBrokerBin+" --user "+ brokerUser +" --task selectsession --sid \""+session+"\"", this,SLOT ( slotSelectSession(bool,QString,int))); } } diff --git a/onmainwindow.cpp b/onmainwindow.cpp index baf69f7..ff50656 100644 --- a/onmainwindow.cpp +++ b/onmainwindow.cpp @@ -5445,14 +5445,7 @@ void ONMainWindow::slotSetModMap() } } } - if(sshConnection->useKerberos()) - { - sshConnection->executeCommand("export DISPLAY=:"+resumingSession.display+"; echo '"+kbMap+"' | xmodmap -"); - } - else - { - sshConnection->executeCommand("export DISPLAY=:"+resumingSession.display+"; echo \\\""+kbMap+"\\\" | xmodmap -"); - } + sshConnection->executeCommand("export DISPLAY=:"+resumingSession.display+"; echo \""+kbMap+"\" | xmodmap -"); } #endif diff --git a/sshmasterconnection.cpp b/sshmasterconnection.cpp index 9ad8c1f..b09f04f 100755 --- a/sshmasterconnection.cpp +++ b/sshmasterconnection.cpp @@ -1139,7 +1139,7 @@ bool SshMasterConnection::userAuthKrb() QUuid uuid = QUuid::createUuid(); QString uuidStr = uuid.toString().mid(1, 36).toLower(); - QString shcmd = " echo X2GODATABEGIN:" + uuidStr + "; whoami; echo X2GODATAEND:" + uuidStr ; + QString shcmd = "sh -c 'echo X2GODATABEGIN:" + uuidStr + "; whoami; echo X2GODATAEND:" + uuidStr +";'"; #ifdef Q_OS_WIN sshCmd="plink -batch "+user+"@"+host+" -P "+ diff --git a/sshprocess.cpp b/sshprocess.cpp index 451425f..f605eb9 100755 --- a/sshprocess.cpp +++ b/sshprocess.cpp @@ -190,7 +190,7 @@ void SshProcess::startNormal(const QString& cmd) // #endif if(!masterCon->useKerberos()) { - QString shcmd = "sh -c \"echo X2GODATABEGIN:" + uuidStr + "; PATH=/usr/local/bin:/usr/bin:/bin "+cmd+"; echo X2GODATAEND:" + uuidStr +"\";"; + QString shcmd = "sh -c 'echo X2GODATABEGIN:" + uuidStr + "; PATH=/usr/local/bin:/usr/bin:/bin "+cmd+"; echo X2GODATAEND:" + uuidStr +";'"; masterCon->addChannelConnection(this, uuidStr, shcmd); connect(masterCon,SIGNAL(stdOut(SshProcess*,QByteArray)),this,SLOT(slotStdOut(SshProcess*,QByteArray))); connect(masterCon,SIGNAL(channelClosed(SshProcess*,QString)), this,SLOT(slotChannelClosed(SshProcess*,QString))); @@ -198,7 +198,7 @@ void SshProcess::startNormal(const QString& cmd) else { QString host=masterCon->getHost(); - QString shcmd = "echo X2GODATABEGIN:" + uuidStr + "; PATH=/usr/local/bin:/usr/bin:/bin "+cmd+"; echo X2GODATAEND:" + uuidStr; + QString shcmd = "sh -c 'echo X2GODATABEGIN:" + uuidStr + "; PATH=/usr/local/bin:/usr/bin:/bin "+cmd+"; echo X2GODATAEND:" + uuidStr +";'"; proc=new QProcess(this); #ifdef Q_OS_WIN if(masterCon->get_kerberosDelegation()) -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git