URL Parse Split incorreclty interpret proxy pw, which include '?'
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 36k
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 558
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Issue でリンクされている URL 分割コードがある Lib/urllib/parse.py から始め、http://user:p?assword@server:port のパースを再現してください。プロキシ認証情報内の疑問符に対する想定どおりの処理を確認し、その後、この例でパスワードの一部が別の URL コンポーネントとして扱われなくなっていることを検証してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- networking
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100