summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki2
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2016-02-28 01:37:11 -0800
committerSteve Piercy <web@stevepiercy.com>2016-02-28 01:37:11 -0800
commit860310e6486645394c0be84762ab24887d4760f5 (patch)
treeb7dbebddd5a243f29257f7b67d9ebcc10e26704b /docs/tutorials/wiki2
parent8c76c75e8345aac1c447f33cc223d687b84c3697 (diff)
parenta26a08b92f390aeaa3eb0c39241bb5e76f5a72ea (diff)
downloadpyramid-860310e6486645394c0be84762ab24887d4760f5.tar.gz
pyramid-860310e6486645394c0be84762ab24887d4760f5.tar.bz2
pyramid-860310e6486645394c0be84762ab24887d4760f5.zip
Merge pull request #2379 from stevepiercy/feature/alchemy-scaffold-update-authcn
wiki2 authentication bug fix
Diffstat (limited to 'docs/tutorials/wiki2')
-rw-r--r--docs/tutorials/wiki2/src/authentication/tutorial/models/user.py2
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/models/user.py2
-rw-r--r--docs/tutorials/wiki2/src/models/tutorial/models/user.py2
-rw-r--r--docs/tutorials/wiki2/src/tests/tutorial/models/user.py2
-rw-r--r--docs/tutorials/wiki2/src/views/tutorial/models/user.py2
5 files changed, 5 insertions, 5 deletions
diff --git a/docs/tutorials/wiki2/src/authentication/tutorial/models/user.py b/docs/tutorials/wiki2/src/authentication/tutorial/models/user.py
index 6fb32a1b2..6bd3315d6 100644
--- a/docs/tutorials/wiki2/src/authentication/tutorial/models/user.py
+++ b/docs/tutorials/wiki2/src/authentication/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.encode('utf8')
+ expected_hash = self.password_hash
actual_hash = bcrypt.hashpw(pw.encode('utf8'), expected_hash)
return expected_hash == actual_hash
return False
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/models/user.py b/docs/tutorials/wiki2/src/authorization/tutorial/models/user.py
index 6fb32a1b2..6bd3315d6 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.encode('utf8')
+ expected_hash = self.password_hash
actual_hash = bcrypt.hashpw(pw.encode('utf8'), expected_hash)
return expected_hash == actual_hash
return False
diff --git a/docs/tutorials/wiki2/src/models/tutorial/models/user.py b/docs/tutorials/wiki2/src/models/tutorial/models/user.py
index 6fb32a1b2..6bd3315d6 100644
--- a/docs/tutorials/wiki2/src/models/tutorial/models/user.py
+++ b/docs/tutorials/wiki2/src/models/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.encode('utf8')
+ expected_hash = self.password_hash
actual_hash = bcrypt.hashpw(pw.encode('utf8'), expected_hash)
return expected_hash == actual_hash
return False
diff --git a/docs/tutorials/wiki2/src/tests/tutorial/models/user.py b/docs/tutorials/wiki2/src/tests/tutorial/models/user.py
index 6fb32a1b2..6bd3315d6 100644
--- a/docs/tutorials/wiki2/src/tests/tutorial/models/user.py
+++ b/docs/tutorials/wiki2/src/tests/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.encode('utf8')
+ expected_hash = self.password_hash
actual_hash = bcrypt.hashpw(pw.encode('utf8'), expected_hash)
return expected_hash == actual_hash
return False
diff --git a/docs/tutorials/wiki2/src/views/tutorial/models/user.py b/docs/tutorials/wiki2/src/views/tutorial/models/user.py
index 6fb32a1b2..6bd3315d6 100644
--- a/docs/tutorials/wiki2/src/views/tutorial/models/user.py
+++ b/docs/tutorials/wiki2/src/views/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.encode('utf8')
+ expected_hash = self.password_hash
actual_hash = bcrypt.hashpw(pw.encode('utf8'), expected_hash)
return expected_hash == actual_hash
return False