Skip to content

Commit

Permalink
Bug Fix - The password storage is now Bcrypt.hashed
Browse files Browse the repository at this point in the history
Previously was plain text storage
  • Loading branch information
Adi Chirilov committed Jun 7, 2020
1 parent c19bb52 commit 207177b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## [Unreleased] 2020-06-07
### Bug Fix
- The password storage is now Bcrypt.hashed

## [1.0.2] 2020-06-02
### Improvements
- Added deploy scripts: Docker, Gunicorn
Expand Down
5 changes: 2 additions & 3 deletions app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def register():

else:

pw_hash = password #bc.generate_password_hash(password)
pw_hash = bc.generate_password_hash(password)

user = User(username, email, pw_hash)

Expand Down Expand Up @@ -97,8 +97,7 @@ def login():

if user:

#if bc.check_password_hash(user.password, password):
if user.password == password:
if bc.check_password_hash(user.password, password):
login_user(user)
return redirect(url_for('index'))
else:
Expand Down

0 comments on commit 207177b

Please sign in to comment.