Message330884
the scheme argument of urlsplit/urlparse is completely broken.
here two examples:
urlunsplit(urlsplit("httpbin.org", scheme="https://"))
'https://:httpbin.org'
urlunsplit(urlsplit("httpbin.org", scheme="https"))
'https:///httpbin.org'
Fix: change urlsplit logic like this:
...
url, scheme, _coerce_result = _coerce_args(url, scheme)
scheme = scheme.rstrip("://") # this removes ://
...
i = url.find('://') # harden against arbitrary :
if i > 0:
...
elif scheme:
netloc, url = _splitnetloc(url, 0) # if scheme is specified, netloc is implied
sry too lazy to create a patch from this. Most probably are all python versions affected but I checked only 2.7 and 3.7 . |
|
| Date |
User |
Action |
Args |
| 2018-12-02 15:27:37 | devkral | set | recipients:
+ devkral |
| 2018-12-02 15:27:37 | devkral | set | messageid: <[email protected]> |
| 2018-12-02 15:27:37 | devkral | link | issue35377 messages |
| 2018-12-02 15:27:37 | devkral | create | |
|