diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-05-28 20:34:20 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-05-29 09:35:52 +0200 |
commit | 733a39a907381b14196c3763b39a04f174e049a1 (patch) | |
tree | c295e609ad111a2169c0808d0b6b68f7b19ef5df | |
parent | 32d4d6b969bfc8bf8f3b85a60c999d15469ff55b (diff) |
libssh2: improved error output for wrong quote syntax
Reported-by: Werner Stolz
Closes #5474
-rw-r--r-- | lib/vssh/libssh2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/vssh/libssh2.c b/lib/vssh/libssh2.c index e31486275..63663ec46 100644 --- a/lib/vssh/libssh2.c +++ b/lib/vssh/libssh2.c @@ -1359,7 +1359,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) */ cp = strchr(cmd, ' '); if(cp == NULL) { - failf(data, "Syntax error in SFTP command. Supply parameter(s)!"); + failf(data, "Syntax error command '%s'. Missing parameter!", + cmd); state(conn, SSH_SFTP_CLOSE); sshc->nextstate = SSH_NO_STATE; sshc->actualcode = CURLE_QUOTE_ERROR; @@ -1375,7 +1376,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(result == CURLE_OUT_OF_MEMORY) failf(data, "Out of memory"); else - failf(data, "Syntax error: Bad first parameter"); + failf(data, "Syntax error: Bad first parameter to '%s'", cmd); state(conn, SSH_SFTP_CLOSE); sshc->nextstate = SSH_NO_STATE; sshc->actualcode = result; @@ -1400,8 +1401,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) if(result == CURLE_OUT_OF_MEMORY) failf(data, "Out of memory"); else - failf(data, "Syntax error in chgrp/chmod/chown: " - "Bad second parameter"); + failf(data, "Syntax error in %s: Bad second parameter", cmd); Curl_safefree(sshc->quote_path1); state(conn, SSH_SFTP_CLOSE); sshc->nextstate = SSH_NO_STATE; |