This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2goclient. from da584f0 Makefile: add comment explaining why we need to do this in the first place and why it's so complicated. new ad62687 src/sshmasterconnection: ignore "garbage", but require at least one line to start with a known challenge auth prompt. Fixes: #966. The 1 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 | 2 ++ src/sshmasterconnection.cpp | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) -- Alioth's /srv/git/code.x2go.org/x2goclient.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 ad6268711062cbabbe0ec67d67d1f0df38b43217 Author: Mihai Moldovan <ionic@ionic.de> Date: Fri Sep 1 08:32:14 2017 +0200 src/sshmasterconnection: ignore "garbage", but require at least one line to start with a known challenge auth prompt. Fixes: #966. --- debian/changelog | 2 ++ src/sshmasterconnection.cpp | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 0b11622..9ed36f0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -182,6 +182,8 @@ x2goclient (4.1.0.1-0x2go1) UNRELEASED; urgency=medium effect on this behavior, so removing it again. - Makefile: add comment explaining why we need to do this in the first place and why it's so complicated. + - src/sshmasterconnection: ignore "garbage", but require at least one line + to start with a known challenge auth prompt. Fixes: #966. * x2goclient.spec: - Respect %{optflags} and pass QMAKE_STRIP=: to fix missing debug info issues. diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp index 0556299..e0ea7d2 100644 --- a/src/sshmasterconnection.cpp +++ b/src/sshmasterconnection.cpp @@ -1196,9 +1196,20 @@ bool SshMasterConnection::userChallengeAuth() else { for (std::size_t i = 0; i < challenge_auth_code_prompts_size; ++i) { x2goDebug << "Checking against known prompt #" << i << ": " << challenge_auth_code_prompts_[i] << endl; - if (pr.startsWith (challenge_auth_code_prompts_[i])) { + + /* Ignore "garbage" at the start of the string, but require at least one line to start with a known prompt. */ + QStringList tmp_str_list = pr.split ("\n", QString::SkipEmptyParts); + + for (QStringList::const_iterator cit = tmp_str_list.constBegin (); cit != tmp_str_list.constEnd (); ++cit) { + if ((*cit).startsWith (challenge_auth_code_prompts_[i])) { has_challenge_auth_code_prompt = true; break; + } + } + + /* Skip over other challenge auth code prompts if we found one already. */ + if (has_challenge_auth_code_prompt) { + break; } } } -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git