URL Parse Split incorreclty interpret proxy pw, which include '?'
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- python
- 领域
- networking
调研方向
从 Lib/urllib/parse.py 中 issue 所链接的 URL 分割代码开始,复现对 http://user:p?assword@server:port 的解析。确认代理凭据中问号的预期处理方式,然后验证该示例不再将密码的一部分视为单独的 URL 组件。
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 36k
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 558
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
python/cpython 的其他 Issue
-
docs pending
难度 2/5 1-3 小时 新手友好度 78/100
-
stdlib type-feature
难度 2/5 1-3 小时 新手友好度 78/100
-
stdlib type-feature
难度 2/5 1-3 小时 新手友好度 72/100
-
build type-bug
难度 2/5 1-3 小时 新手友好度 76/100
-
stdlib topic-email type-feature
难度 2/5 1-3 小时 新手友好度 70/100
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 86/100
zostera/django-bootstrap4#894 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
use-agent-os/agent-os#3276 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
难度 2/5 1-3 小时 新手友好度 88/100
NousResearch/hermes-agent#117848 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
zilliztech/memsearch#759 ·