dropbox / zxcvbn-ios

A realistic password strength estimator.
https://tech.dropbox.com/2012/04/zxcvbn-realistic-password-strength-estimation/
MIT License
223 stars 64 forks source link

Wrong NSRange calculations in [DBMatcher sequenceMatch] #1

Closed tagyro closed 10 years ago

tagyro commented 10 years ago

Steps to reproduce:

leah commented 10 years ago

Hi @tagyro,

I'm unable to reproduce this issue. Are you entering any special characters? Are you using the simulator or a device?

The substringWithRange method is used all over the place in DBMatcher and DBScorer. Any clue where this error is occurring?

Thanks!

tagyro commented 10 years ago

Hi @leah I've been able to reproduce the crash consistently by following these steps:

Note: if I just clone the repo and run the demo, the app crashes on launch because of the passwords array test in the AppDelegate.m. I commented out those lines to be able to run the app!
I've uploaded a video on Mega: https://mega.co.nz/#!BAtnTBIS!NmSiAC4XsMM3Z67XLr9VWEtEniMdbPrC_GOyYZ9dkCA