Skip to content

Commit 091d51b

Browse files
Merge pull request #286 from MasoniteFramework/fix/wrong-password-issue
fixed issue with wrong password
2 parents 5dee651 + 3687980 commit 091d51b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/masonite/__version__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
__title__ = 'masonite'
33
__description__ = 'The core for the Masonite framework'
44
__url__ = 'https://github.com/MasoniteFramework/masonite'
5-
__version__ = '2.3.5'
5+
__version__ = '2.3.6'
66
__author__ = 'Joseph Mancuso'
77
__author_email__ = '[email protected]'
88
__licence__ = 'MIT'

src/masonite/auth/guards/WebGuard.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ def login(self, name, password):
7575
# while PostgreSQL can store it as bytes
7676
# This is to prevent to double encode the password as bytes
7777
password_as_bytes = self._get_password_column(model)
78-
if (not isinstance(password_as_bytes, bytes)):
79-
password_as_bytes = bytes(password_as_bytes, 'utf-8')
78+
if not isinstance(password_as_bytes, bytes):
79+
password_as_bytes = bytes(password_as_bytes or '', 'utf-8')
8080

8181
if model and bcrypt.checkpw(bytes(password, 'utf-8'), password_as_bytes):
8282
if not self._once:

0 commit comments

Comments
 (0)