python / python/cpython

The pickle module documentation makes confusing statements about secure alternatives

未关闭
#124,583 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

docs
主要语言
Python
星标
77.2k
派生
35.9k
PR 合并指标
PR 指标待抓取

描述

Documentation

The pickle module states that the xmlrpc marshaling API should be used if the users desire a safe alternative to unpickling untrusted data:

https://docs.python.org/3.14/library/pickle.html:

As our examples shows, you have to be careful with what you allow to be unpickled. Therefore if security is a concern, you may want to consider alternatives such as the marshalling API in xmlrpc.client or third-party solutions.

However, the xmlrpc module has right at the top a warning that says the following:

https://docs.python.org/3.14/library/xmlrpc.client.html#module-xmlrpc.client:

The xmlrpc.client module is not secure against maliciously constructed data. If you need to parse untrusted or unauthenticated data see XML vulnerabilities.

These two statements contradict each other and could lead users to falsely believe that they are using a safe alternative.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 pickle 模块文档中关于 xmlrpc.client 的表述开始,并将其与 xmlrpc.client 文档顶部的安全警告进行比较。修订其中相互冲突的指导,避免用户将 xmlrpc.client 视为可安全处理不可信数据;当这两个页面给出一致的安全建议时,工作即告完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
documentation, security
Issue 类型
文档
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
描述清楚
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。