-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
urlapi: reject spaces in URLs, allow if flagbit set #7073
Conversation
fb5bbd6
to
0db4cc7
Compare
They were never officially allowed and slipped in only due to sloppy parsing. Spaces (ascii 32) should be correctly encoded (to %20) before being part of a URL. The new flag bit CURLU_ALLOW_SPACE when a full URL is set, makes libcurl allow spaces. Closes #7073
0db4cc7
to
5c444ab
Compare
They were never officially allowed and slipped in only due to sloppy parsing. Spaces (ascii 32) should be correctly encoded (to %20) before being part of a URL. The new flag bit CURLU_ALLOW_SPACE when a full URL is set, makes libcurl allow spaces. Updated test 1560 to verify. Closes #7073
5c444ab
to
40658cd
Compare
They were never officially allowed and slipped in only due to sloppy parsing. Spaces (ascii 32) should be correctly encoded (to %20) before being part of a URL. The new flag bit CURLU_ALLOW_SPACE when a full URL is set, makes libcurl allow spaces. Updated test 1560 to verify. Closes #7073
40658cd
to
313a9bd
Compare
@bagder did you intend to merge this? I notice you removed next-feature-window a while back. |
I did mean to do that. I've hesitated a little but I'll move forward on this again in a bit. |
@bagder Maybe mark in the documentation the first version where |
Latest curl versions started to treat such URLs as invalid. See: curl/curl#7073 Signed-off-by: Michal Berger <michalx.berger@intel.com> Change-Id: Ic5ab34a566f89f411ec40cbcb8de57a8d2f3ea88 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10607 Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
The browsers' "URL bars" don't show URLs and don't follow the URL syntax. Normally however, if you copy the data in the URL bar they tend to store that copy in the clipboard in a better URL format.
Everything is always debatable, but having the argument in an old closed pull-request is not the most suitable place for this discussion. |
Latest curl versions started to treat such URLs as invalid. See: curl/curl#7073 Signed-off-by: Michal Berger <michalx.berger@intel.com> Change-Id: Ic5ab34a566f89f411ec40cbcb8de57a8d2f3ea88 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10607 Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
They were never officially allowed and slipped in only due to sloppy
parsing. Spaces (ascii 32) should be correctly encoded (to %20) before
being part of a URL.
The new flag bit
CURLU_ALLOW_SPACE
when a full URL is set, makes libcurl allow spaces.