summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2016-02-28 01:22:20 -0800
committerSteve Piercy <web@stevepiercy.com>2016-02-28 01:22:20 -0800
commitee4050ac0a4a60343eb736a90b47113ebfbb60a3 (patch)
treed2bea94f69ad909696b3c84ebb03e6f507369392
parent082d3b2cb9127f8acfd4d081e69c427a37bae91d (diff)
downloadpyramid-ee4050ac0a4a60343eb736a90b47113ebfbb60a3.tar.gz
pyramid-ee4050ac0a4a60343eb736a90b47113ebfbb60a3.tar.bz2
pyramid-ee4050ac0a4a60343eb736a90b47113ebfbb60a3.zip
wiki2 revert unnecessary hmac stuff
-rw-r--r--docs/tutorials/wiki2/src/authentication/tutorial/models/user.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/docs/tutorials/wiki2/src/authentication/tutorial/models/user.py b/docs/tutorials/wiki2/src/authentication/tutorial/models/user.py
index 6499491b2..6bd3315d6 100644
--- a/docs/tutorials/wiki2/src/authentication/tutorial/models/user.py
+++ b/docs/tutorials/wiki2/src/authentication/tutorial/models/user.py
@@ -1,5 +1,4 @@
import bcrypt
-import hmac
from sqlalchemy import (
Column,
Integer,
@@ -26,5 +25,5 @@ class User(Base):
if self.password_hash is not None:
expected_hash = self.password_hash
actual_hash = bcrypt.hashpw(pw.encode('utf8'), expected_hash)
- return hmac.compare_digest(expected_hash, actual_hash)
+ return expected_hash == actual_hash
return False