trustelem / zxcvbn

Go implementation of Dropbox's zxcvbn realistic password strength estimator
MIT License
67 stars 13 forks source link

add no_embedded_dict build tag #10

Closed okzk closed 4 years ago

okzk commented 4 years ago

Hi.

We need to use additinal localized dictionaris for security reasons. To achieve the above without changing the default behavior, I've added no_embedded_dict build tag.

If this build tag is set, default dictionaries are loaded from local json file specified by ZXCVBN_DEFAULT_DICTIONARIES_JSON env.

e.g.

cd /path/to/some_app
go build -tags=no_embedded_dict
ZXCVBN_DEFAULT_DICTIONARIES_JSON=data/dict.json ./some_app

Would you accept this PR?

coveralls commented 4 years ago

Pull Request Test Coverage Report for Build 30


Totals Coverage Status
Change from base Build 28: 0.0%
Covered Lines: 2130
Relevant Lines: 2196

💛 - Coveralls
vanackere commented 4 years ago

Sorry for the delay, your approach was fine and is now merged, thanks !