summaryrefslogtreecommitdiff
path: root/passlib/context.py
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2011-08-10 21:32:36 -0400
committerEli Collins <elic@assurancetechnologies.com>2011-08-10 21:32:36 -0400
commit969c261fdfa2d910f7b3479bb0f4fae83c649f1b (patch)
tree2a2b32e36e331634909d23a7115a491f494e3aa2 /passlib/context.py
parent6e22662486bff9a547e29ee192c131afedfa3fd7 (diff)
downloadpasslib-969c261fdfa2d910f7b3479bb0f4fae83c649f1b.tar.gz
bugfix to CryptContext.verify [issue 17]
* fixed formatting error thrown by CryptContext.verify when issuing min_verify_time warning * rewrote CryptContext.verify's min_verify_time UT to: - use mock hash handler - verify that appropriate warning is issued when going overtime
Diffstat (limited to 'passlib/context.py')
-rw-r--r--passlib/context.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/passlib/context.py b/passlib/context.py
index 986f015..e3da021 100644
--- a/passlib/context.py
+++ b/passlib/context.py
@@ -1082,7 +1082,8 @@ class CryptContext(object):
time.sleep(delta)
elif delta < 0:
#warn app they aren't being protected against timing attacks...
- warn("CryptContext: verify exceeded min_verify_time: scheme=%r min_verify_time=%r elapsed=%r", handler.name, mvt, end-start)
+ warn("CryptContext: verify exceeded min_verify_time: scheme=%r min_verify_time=%r elapsed=%r" %
+ (handler.name, mvt, end-start))
return result