python / python/cpython

The pickle module documentation makes confusing statements about secure alternatives

Đang mở
#124,583 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

docs
Ngôn ngữ chính
Python
Star
77.2k
Fork
35.9k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với phát biểu trong tài liệu của mô-đun pickle về xmlrpc.client và so sánh phát biểu đó với cảnh báo bảo mật ở đầu tài liệu xmlrpc.client. Sửa lại hướng dẫn mâu thuẫn để người dùng không bị dẫn dắt đến việc coi xmlrpc.client là an toàn đối với dữ liệu không đáng tin cậy; công việc hoàn tất khi hai trang đưa ra lời khuyên bảo mật nhất quán.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
documentation, security
Loại issue
Tài liệu
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
38/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.