OverflowError: math range error
还没有人认领这个 Issue。
评估
调研方向
从 zxcvbn/scoring.py 中的 entropy_to_crack_time 开始,以 traceback 和长密码复现作为切入点。检查 scoring 的现有测试,并为超长输入添加覆盖;当 password_strength 处理该输入时不会引发 OverflowError,即表示完成。
由索引模型根据 Issue 内容生成。
描述
I started receiving error 500 emails from my Django project, revealing that someone has been trying to input extremely long passwords. I can easily reproduce this with zxcvbn 1.0:
from zxcvbn import password_strength
>>> password = "this is a test"
>>> password_strength(password)
[normal results]
>>> password = "Heavy flooding over eastern Japan washed away houses and forced residents to their rooftops, desperate for rescue by military helicopters. The raging brown floodwaters spawned from Typhoon Etau, which has dumped 60 centimeters (2 feet) of rain over some areas since Monday. Combine that with several weeks of near-daily rainfall, and Ibaraki and Tochigi prefectures are now deluged and unrecognizable."
>>> password_strength(password) Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/Users/me/Sites/virtualenvs/foo/lib/python2.7/site-packages/zxcvbn/main.py", line 10, in password_strength
result = minimum_entropy_match_sequence(password, matches)
File "/Users/me/Sites/virtualenvs/foo/lib/python2.7/site-packages/zxcvbn/scoring.py", line 109, in minimum_entropy_match_sequence
crack_time = entropy_to_crack_time(min_entropy)
File "/Users/me/Sites/virtualenvs/foo/lib/python2.7/site-packages/zxcvbn/scoring.py", line 150, in entropy_to_crack_time
return (0.5 * math.pow(2, entropy)) * SECONDS_PER_GUESS # average, not total
OverflowError: math range error
- 主要语言
- HTML
- 星标
- 259
- 派生
- 56
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dropbox/python-zxcvbn 的其他 Issue
-
CLAassistant未关闭
难度 4/5 3-5 天 新手友好度 20/100
dropbox/python-zxcvbn#22 ·
-
难度 2/5 1-3 小时 新手友好度 38/100
dropbox/python-zxcvbn#17 · 2 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 35/100
dropbox/python-zxcvbn#16 ·
-
难度 4/5 3-5 天 新手友好度 35/100
dropbox/python-zxcvbn#14 · 2 条评论 · 1 个 reaction ·
-
难度 5/5 一周以上 新手友好度 20/100
dropbox/python-zxcvbn#6 · 4 条评论 ·
查看 dropbox/python-zxcvbn 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 78/100
sandialabs/atlas-ui-3#978 ·
维护者通常 1 天内回复
-
agent-reported area/init bug good first issue hacktoberfest help wanted P2
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
-
难度 1/5 1 小时以内 新手友好度 88/100
evilsocket/opensnitch#1674 ·