Skip to content

Commit

Permalink
Merge pull request #286 from MasoniteFramework/fix/wrong-password-issue
Browse files Browse the repository at this point in the history
fixed issue with wrong password
  • Loading branch information
josephmancuso authored Apr 26, 2020
2 parents 5dee651 + 3687980 commit 091d51b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/masonite/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
__title__ = 'masonite'
__description__ = 'The core for the Masonite framework'
__url__ = 'https://github.com/MasoniteFramework/masonite'
__version__ = '2.3.5'
__version__ = '2.3.6'
__author__ = 'Joseph Mancuso'
__author_email__ = 'joe@masoniteproject.com'
__licence__ = 'MIT'
4 changes: 2 additions & 2 deletions src/masonite/auth/guards/WebGuard.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ def login(self, name, password):
# while PostgreSQL can store it as bytes
# This is to prevent to double encode the password as bytes
password_as_bytes = self._get_password_column(model)
if (not isinstance(password_as_bytes, bytes)):
password_as_bytes = bytes(password_as_bytes, 'utf-8')
if not isinstance(password_as_bytes, bytes):
password_as_bytes = bytes(password_as_bytes or '', 'utf-8')

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

0 comments on commit 091d51b

Please sign in to comment.