nowsecure / owasp-password-strength-test

OWASP Password Strength Test for Node.js
MIT License
241 stars 56 forks source link

Shouldn't space be considered a special character? #4

Closed gaurav- closed 9 years ago

gaurav- commented 9 years ago

Thank you for the very useful library, it sure saved me a lot of time! But I encountered one unexpected behavior – I was expecting space to be treated as a special character. The OWASP guideline also mentions this…

at least 1 special character (punctuation) — do not forget to treat space as special characters too

…and they have listed what they mean by special characters.

Was exclusion of space from special characters by design? Or is it a bug? I am happy to send a PR (it's a simple fix) but want to be sure first.

chrisallenlane commented 9 years ago

Hi guarav

Thanks for pointing that out! That's absolutely a bug versus a design decision. I was just about to publish a new version of this module (1.3.0), so I can tackle this now too. (Actually, I already did, including a regression test.)

This will be published momentarily. Thanks very much!

chrisallenlane commented 9 years ago

If you'd like to review it, this is the patch that I introduced:

https://github.com/nowsecure/owasp-password-strength-test/commit/62a40473eee848b63484bbb8a4b26052a8aa7e1e

Does that seem sane to you?

chrisallenlane commented 9 years ago

Closing as resolved with 62a4047. (Can reopen the ticket if necessary, per code-review.)