mirror of
https://github.com/curl/curl.git
synced 2026-08-24 14:23:30 +03:00
libssh2: fix error handling on quote errors
Previously it lacked the actual return. libssh.c uses the same function
name.
Verified by test 2007.
Reported-by: m777m0 on hackerone
Follow-up to 578706adde
Closes #20883
This commit is contained in:
parent
a221e2fbff
commit
53a3b2114a
4 changed files with 51 additions and 19 deletions
32
tests/data/test2007
Normal file
32
tests/data/test2007
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="US-ASCII"?>
|
||||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
SFTP
|
||||
--quote
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
# Server-side
|
||||
<reply>
|
||||
</reply>
|
||||
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
sftp
|
||||
</server>
|
||||
<name>
|
||||
SFTP quote rmdir command with trailing junk
|
||||
</name>
|
||||
<command>
|
||||
--hostpubmd5 %SSHSRVMD5 --key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SFTP_PWD/%LOGDIR/file%TESTNUMBER.txt -Q "mkdir /tmp/test trailing_garbage"
|
||||
</command>
|
||||
</client>
|
||||
|
||||
<verify>
|
||||
<errorcode>
|
||||
21
|
||||
</errorcode>
|
||||
</verify>
|
||||
</testcase>
|
||||
Loading…
Add table
Add a link
Reference in a new issue