Skip to content

Trim the user/email provided for password resets - #37495

Merged
come-nc merged 2 commits into
nextcloud:masterfrom
joshtrichards:jr-trim-pw-reset-username
Apr 5, 2023
Merged

Trim the user/email provided for password resets#37495
come-nc merged 2 commits into
nextcloud:masterfrom
joshtrichards:jr-trim-pw-reset-username

Conversation

@joshtrichards

@joshtrichards joshtrichards commented Mar 30, 2023

Copy link
Copy Markdown
Member

Summary

Trims the username/email address provided by the user when requesting a lost password reset. This reduces support requests from users that complain about never receiving password reset emails (because we silently - from the user perspective - dropped the request as being a bogus username/email address).

Since this is a workflow where few indicators are provided to the user (to avoid security information leakage), it seems worthwhile to handle this for the user to catch this common and easy/no-risk scenario. We know with certainty that whitespaces are never allowed at the start/end of usernames so this is safe.

TODO

(nothing)

Checklist

Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
@szaimen szaimen added the 3. to review Waiting for reviews label Mar 30, 2023
@szaimen szaimen added this to the Nextcloud 27 milestone Mar 30, 2023
@szaimen
szaimen requested review from a team, ArtificialOwl, come-nc and icewind1991 and removed request for a team March 30, 2023 16:31

@come-nc come-nc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be trimed before being sent to the hook then, no?

@jtrees

jtrees commented Apr 3, 2023

Copy link
Copy Markdown
Contributor

I am unfamiliar with the Nextcloud code so I cannot review this but I want to thank you for this PR.

Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
@joshtrichards

Copy link
Copy Markdown
Member Author

I think it should be trimed before being sent to the hook then, no?

Indeed @come-nc. Fixed

@joshtrichards
joshtrichards requested a review from come-nc April 5, 2023 02:02
@blizzz blizzz added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Apr 5, 2023
@come-nc
come-nc merged commit 5063b76 into nextcloud:master Apr 5, 2023
@welcome

welcome Bot commented Apr 5, 2023

Copy link
Copy Markdown

Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UX: Forgot password form should trim user input

5 participants