Security Considerations¶
The following modules have specific security considerations:以下模块具有特定的安全注意事项:
base64
:base64 security considerations in RFC 4648RFC 4648中的base64安全注意事项hashlib
:all constructors take a “usedforsecurity” keyword-only argument disabling known insecure and blocked algorithms所有构造函数都只使用“usedforsecurity”关键字参数,禁用已知的不安全和被阻止的算法http.server
is not suitable for production use, only implementing basic security checks不适用于生产使用,仅执行基本安全检查random
shouldn’t be used for security purposes, use不应用于安全目的,而应使用secrets
insteadsecrets
shelve
:shelve is based on pickle and thus unsuitable for dealing with untrusted sourcesshelve基于pickle,因此不适合处理不可信的源tempfile
:mktemp is deprecated due to vulnerability to race conditionsmktemp因易受竞争条件影响而被弃用zipfile
:maliciously prepared .zip files can cause disk volume exhaustion恶意准备的zip文件会导致磁盘卷耗尽