summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2016-05-19 23:37:38 -0500
committerMichael Merickel <michael@merickel.org>2016-05-19 23:37:57 -0500
commit4918628b83319749f73e843ef01a0b9060f5956e (patch)
tree790edf8264c323268f0cad952a1a5a863f5b3d05
parentf038c7d477f98713d48eed9f74822f2b2d7028cd (diff)
downloadpyramid-4918628b83319749f73e843ef01a0b9060f5956e.tar.gz
pyramid-4918628b83319749f73e843ef01a0b9060f5956e.tar.bz2
pyramid-4918628b83319749f73e843ef01a0b9060f5956e.zip
oops, encode the password in the authorization tutorial as well
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/models/user.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/models/user.py b/docs/tutorials/wiki2/src/authorization/tutorial/models/user.py
index 6bd3315d6..6fb32a1b2 100644
--- a/docs/tutorials/wiki2/src/authorization/tutorial/models/user.py
+++ b/docs/tutorials/wiki2/src/authorization/tutorial/models/user.py
@@ -23,7 +23,7 @@ class User(Base):
def check_password(self, pw):
if self.password_hash is not None:
- expected_hash = self.password_hash
+ expected_hash = self.password_hash.encode('utf8')
actual_hash = bcrypt.hashpw(pw.encode('utf8'), expected_hash)
return expected_hash == actual_hash
return False