The library uses for URLs internally, and yarl normalizes URLs by default. It silently decodes some %-encoded characters in the query string that do not strictly need to be encoded.

Sounds harmless, but it isn't. Changing the URL breaks any protocol that signs important aspects of a HTTP request for security.

Took me a while to find this bug. I usually expect an HTTP client library to not silently manipulate the URLs before sending a request. Smarter is not always better

0

If you have a fediverse account, you can quote this note from your own instance. Search https://chaos.social/users/defnull/statuses/115488120527803714 on your instance and quote it. (Note that quoting is not supported in Mastodon.)