Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FTP prequotes ignored if URL is directory #8602

anon00000000 opened this issue Mar 17, 2022 · 4 comments

FTP prequotes ignored if URL is directory #8602

anon00000000 opened this issue Mar 17, 2022 · 4 comments


Copy link

@anon00000000 anon00000000 commented Mar 17, 2022

I did this

$ curl -v ftp://anonymous@user/pub/ -Q '+DELE dummy'
*   Trying
* Connected to user ( port 21 (#0)
< 220 (vsFTPd 3.0.3)
> USER anonymous
< 230 Login successful.
< 257 "/" is the current directory
* Entry path is '/'
> CWD pub
* ftp_perform ends with SECONDARY: 0
< 250 Directory successfully changed.
* Connect data stream passively
< 229 Entering Extended Passive Mode (|||18251|)
*   Trying
* Connecting to ( port 18251
* Connected to user ( port 21 (#0)
< 200 Switching to ASCII mode.
< 150 Here comes the directory listing.
* Maxdownload = -1
-rw-rw-rw-    1 ftp      ftp          2367 Mar 17 10:12 dummy
* Remembering we are in dir "pub/"
< 226 Directory send OK.
* Connection #0 to host user left intact

I expected the following

DELE dummy command sent after CWD.

curl/libcurl version

Reproduced with the latest (7.82.0) static build from the download page.

operating system

Ubuntu 18.04.6

Linux ZBook-user 5.4.0-104-generic #118~18.04.1-Ubuntu SMP Thu Mar 3 13:53:15 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

A debug build of curl git did assure me the prequotes were ignored. Using postquotes work.

@jay jay changed the title FTP prequotes not sent FTP prequotes ignored if URL is directory Mar 17, 2022
@jay jay added the FTP label Mar 17, 2022
Copy link

@jay jay commented Mar 17, 2022

I don't think it ever worked like that and I don't know why it doesn't... Try this: ftp://anonymous@user/pub/dummy -Q '+DELE dummy'

Copy link

@anon00000000 anon00000000 commented Mar 18, 2022

Hmmm, thanks, it works, but I indeed expected the original to work too.

Copy link

@bagder bagder commented Mar 18, 2022

It seems the state machine was just never done for doing "prequotes" for directory listings!

Copy link

@bagder bagder commented Mar 22, 2022

I'm not too eager to work on polishing the FTP state machine to make this work. At least not in the short term. I personally will prefer to document this as a known limitation for the prequote functionality.

bagder added a commit that referenced this issue Mar 29, 2022
Also add to quote.d. Add to TODO as something to add in a future.

Reported-by: anon00000000 on github
Closes #8602
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

3 participants