You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Percent-encoding a reserved character, or decoding a percent-encoded octet that corresponds to a reserved character, will change how the URI is interpreted by most applications.
...
URI producing applications should percent-encode data octets that correspond to characters in the reserved set unless these characters are specifically allowed by the URI scheme to represent data in that component.
...
The characters slash ("/") and question mark ("?") may represent data within the query component.
So, I think it makes sense here if we were to escape all reserved characters, except ! and ?, that are passed into the query parameter as a dict.
We probably want to avoid percent-encoding them if provided as a literal string though, as we wouldn't know if they are intended to be used as delimiters or not (which would match current behaviour regarding the = and & delimiter):
Dreamsorcerer
changed the title
Different response at pass parameter in get method from requests
Percent-encode sub-delimiters in query arguments
Aug 31, 2024
Dreamsorcerer
changed the title
Percent-encode sub-delimiters in query arguments
Percent-encode all reserved characters in query arguments
Aug 31, 2024
Describe the bug
I want to use pass parameter in URL like requests method, but it give me different response
To Reproduce
Expected behavior
Expected behavior:
https://189.84.30.207/catalog-portal/ui/oauth/verify?error=&deviceUdid=%24%7B%22freemarker.template.utility.Execute%22%3Fnew%28%29%28%22ls%22%29%7D
Actual behavior:
https://189.84.30.207/?error=&deviceUdid=$%7B%22freemarker.template.utility.Execute%22?new()(%22ls%22)%7D
Logs/tracebacks
Python Version
aiohttp Version
multidict Version
$ python -m pip show multidict
yarl Version
$ python -m pip show yarl
OS
Ubuntu 20.4 LTS
Related component
Server, Client
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: