diff options
author | Eli Collins <elic@assurancetechnologies.com> | 2013-12-26 16:01:30 -0500 |
---|---|---|
committer | Eli Collins <elic@assurancetechnologies.com> | 2013-12-26 16:01:30 -0500 |
commit | 3091f4fa8fb47568dbdddba721fa92a5ab1839cb (patch) | |
tree | 4974fc653ddb6f0ab55c63e93982e9afdf82dbc6 | |
parent | 26b9e07e2f9709b906a55cf096ab4e4b5d96a31a (diff) | |
download | passlib-3091f4fa8fb47568dbdddba721fa92a5ab1839cb.tar.gz |
bugfix to fuzz test border case: repeat_string() chokes if source is empty string
-rw-r--r-- | passlib/tests/test_handlers_bcrypt.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/passlib/tests/test_handlers_bcrypt.py b/passlib/tests/test_handlers_bcrypt.py index a6027da..b12759d 100644 --- a/passlib/tests/test_handlers_bcrypt.py +++ b/passlib/tests/test_handlers_bcrypt.py @@ -258,7 +258,7 @@ class _bcrypt_test(HandlerCase): if ident == IDENT_2X: # 2x is just recognized, not supported. don't test with it. del kwds['ident'] - elif ident == IDENT_2 and repeat_string(to_bytes(other), len(to_bytes(secret))) == to_bytes(secret): + elif ident == IDENT_2 and other and repeat_string(to_bytes(other), len(to_bytes(secret))) == to_bytes(secret): # avoid false failure due to flaw in 0-revision bcrypt: # repeated strings like 'abc' and 'abcabc' hash identically. other = self.get_fuzz_password() |