OverflowError: math range error
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
Research direction
Start in zxcvbn/scoring.py at entropy_to_crack_time, using the traceback and the long-password reproduction as the entry point. Check the existing tests for scoring and add coverage for very long inputs; done means password_strength handles that input without raising OverflowError.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- HTML
- Stars
- 259
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dropbox/python-zxcvbn
-
CLAassistantOpen
Difficulty 4/5 3-5 days Newbie friendliness 20/100
dropbox/python-zxcvbn#22 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 38/100
dropbox/python-zxcvbn#17 · 2 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 35/100
dropbox/python-zxcvbn#16 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
dropbox/python-zxcvbn#14 · 2 comments · 1 reaction ·
-
Unittests missingOpen
Difficulty 5/5 Over a week Newbie friendliness 20/100
dropbox/python-zxcvbn#6 · 4 comments ·
All issues in dropbox/python-zxcvbn
Similar issues
-
config core enhancement
Difficulty 1/5 Under an hour Newbie friendliness 86/100
bunkerity/bunkerweb#4018 · 1 comment ·
Maintainers usually reply within 1 day
-
actor/human kind/bug priority/important-soon triage-accepted
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
kelos-dev/kelos#1804 · 2 comments ·
Maintainers usually reply within 1 day
-
enhancement priority: low security severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
PierrunoYT/patch#208 ·
Maintainers usually reply within 1 day
-
security
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Sendspin/sendspin-dotnet#339 ·
Maintainers usually reply within 1 day
-
OIDC SSO rejects ES384 ID tokens (e.g. Logto)Possibly taken @sxh313 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
TencentCloud/Octop#1761 · 1 comment ·
Maintainers usually reply within 1 day