-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
SFTP path "/~" is no longer resolving #11001
Comments
It did strike me that we generally document that you need to end the path with a trailing slash to get a directory listing, which this does not. So, I'm not sure if we need to fix the code or make the documentation clearer... |
So, if I understand you correctly, in the previous version (before commit 4e2b52b5f7a3bf50a), it was mistakenly possible to successfully process the request |
libcurl used to do a directory listing for this case (even though the documentation says a URL needs to end in a slash for this), but 4e2b52b modified the behavior. This change brings back a directory listing for SFTP paths that are specified exactly as /~ in the URL. Reported-by: Pavel Mayorov Fixes #11001
I made #11023 that brings back the previous behavior |
libcurl used to do a directory listing for this case (even though the documentation says a URL needs to end in a slash for this), but 4e2b52b modified the behavior. This change brings back a directory listing for SFTP paths that are specified exactly as /~ in the URL. Reported-by: Pavel Mayorov Fixes curl#11001 Closes curl#11023
I tried to access the home directory via SFTP and received an error, even though this type of request was working before:
About my Ubuntu 22.04:
This behavior appeared after adding commit 4e2b52b5f7a3bf50a.
After investigating the issue, I found out the following:
/~/
, but/~
remains unchanged./~
, but after successful resolving to/home/builder
, the resulting request still didn't workIt turned out that for SFTP requests, it's necessary to finalize the path with a
/
. In the old algorithm, when resolving~
, symbol/
was automatically added after the home directory in the resulting path, which allowed the request to work. But, for example, the next request didn't work:So I'm not sure yet whether the function Curl_getworkingpath() should resolve the path
/~
to/home/user
or to/home/user/
, as it was before.The text was updated successfully, but these errors were encountered: