aiohttp icon indicating copy to clipboard operation
aiohttp copied to clipboard

Bugs

Open anylayer opened this issue 6 months ago • 2 comments

Describe the bug

This code snippet has a bug: it converts %2F to /, which causes the signature to fail. aiohttp/client.py 547 line

try:
    url = self._build_url(str_or_url)
except ValueError as e:
    raise InvalidUrlClientError(str_or_url) from e

To Reproduce

x-signature=rX7AnN6H6BGSzbXpbUQsY%2FXCC2w%3D => x-signature=rX7AnN6H6BGSzbXpbUQsY/XCC2w%3D

Expected behavior

x-signature=rX7AnN6H6BGSzbXpbUQsY%2FXCC2w%3D => x-signature=rX7AnN6H6BGSzbXpbUQsY%2FXCC2w%3D

Logs/tracebacks

nop

Python Version

3.13

aiohttp Version

Name: aiohttp
Version: 3.12.12

multidict Version

$ python -m pip show multidict

propcache Version

$ python -m pip show propcache

yarl Version

$ python -m pip show yarl

OS

macOS

Related component

Client

Additional context

No response

Code of Conduct

  • [x] I agree to follow the aio-libs Code of Conduct

anylayer avatar Jun 13 '25 01:06 anylayer

Is there a real-world scenario where this is important? Any reproducer?

webknjaz avatar Jun 13 '25 06:06 webknjaz

547 line

This line may contain different things in different versions and commits. This isn't really an indicative reference to exact snippet.

webknjaz avatar Jun 13 '25 06:06 webknjaz

@anylayer are you still interested in this?

webknjaz avatar Aug 13 '25 15:08 webknjaz