-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix: updates message on reset password if user isn't registered #6079
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: updates message on reset password if user isn't registered #6079
Conversation
Codecov Report
@@ Coverage Diff @@
## development #6079 +/- ##
==============================================
+ Coverage 66.19% 66.2% +<.01%
==============================================
Files 285 285
Lines 14195 14197 +2
==============================================
+ Hits 9397 9399 +2
Misses 4798 4798
Continue to review full report at Codecov.
|
|
@iamareebjamal the server responds with message |
db72314 to
1d49322
Compare
|
@iamareebjamal I've updated the PR. Please review |
1d49322 to
de47ab8
Compare
|
@iamareebjamal I'm logging email for both the cases so that user cannot differentiate from response that whether email is registered or not. Please review |
|
Logs are for us and not the user. I want to differentiate between valid and non valid emails |
eb44044 to
22cabff
Compare
|
@iamareebjamal I have logged email in case of |
app/api/auth.py
Outdated
| user = User.query.filter_by(email=email).one() | ||
| except NoResultFound: | ||
| return NotFoundError({'source': ''}, 'User not found').respond() | ||
| logging.info(email) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a logger. Never use root logging module.
Also, logging just the email makes no sense. What will I know from that. Properly log Tried to reset password not existing email
remove duplication and log email
df9c93c to
2f04bc2
Compare
|
@iamareebjamal created a logger and logged the proper info. Please review |
mrsaicharan1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously logging info wasn't there but now it's fine. LGTM
Fixes #6069
Short description of what this resolves:
Raising an error on password reset if the user is not registered is like gifting hackers a list of users present in the database.
Changes proposed in this pull request:
Checklist
developmentbranch.