URL Parse Split incorreclty interpret proxy pw, which include '?'
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 36k
- Merge medio
- 1g 9h
- PR unite (30g)
- 558
Descrizione
Hi,
I have exported the env var for http proxy, where the Username and password is included in the URL.
The password of the user includes an '?', which is the reason, why the URL string is not correctly processed.
The URL
http_proxy='http://<username>:<pass_with_?>@<server>:<port>'
When the method splits:
https://github.com/python/cpython/blob/53d9cd95cd91f1a291a3923acb95e0e86942291a/Lib/urllib/parse.py#L477
It splits at the ? of the password.
Therefore resulting into
File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 950, in proxy_info_from_url
port = int(port)
ValueError: invalid literal for int() with base 10: 'p'
if the URL would be:
http://user:p?assword@server:port
Regards
Nam
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Iniziate in Lib/urllib/parse.py, nel codice di suddivisione degli URL collegato nell’issue, e riproducete il parsing di http://user:p?assword@server:port. Confermate la gestione prevista per un punto interrogativo nelle credenziali del proxy, quindi verificate che l’esempio non tratti più parte della password come un componente separato dell’URL.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- networking
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100