dwolfhub/zxcvbn-python

zxcvbn is not thread safe

lukedd opened this issue · 2 comments

zxcvbn.zxcvbn(password, user_inputs) is not thread safe, because it calls matching.set_user_input_dictionary(...) which puts state into a module global variable RANKED_DICTIONARIES

This can lead to incorrect behaviour if two threads are concurrently calling this function with different user_inputs.

thanks for reporting.

i believe i have a quick fix in place. in master branch. can you confirm?

Thanks, that change on master looks like it fixes the issue