Skip to content

Trim username and email input to avoid NPE #628

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

Merged
merged 1 commit into from
May 27, 2021
Merged

Trim username and email input to avoid NPE #628

merged 1 commit into from
May 27, 2021

Conversation

lbalmaceda
Copy link
Contributor

Changes

When the form fires an event to authenticate the user, it passes the input in a DTO class (the "event"). The input was not being normalized before being passed, causing the regex checking logic to fail when whitespace was added at the beginning or end of the string.

This PR trims the email and username input before passing them to the event.

References

See #627

Testing

These View classes are not unit tested. However, here's a manual test video:

Tan.Condor.mp4

@lbalmaceda lbalmaceda added CH: Fixed small Small review labels May 26, 2021
@lbalmaceda lbalmaceda added this to the v2-Next milestone May 26, 2021
@lbalmaceda lbalmaceda requested a review from a team as a code owner May 26, 2021 16:54
@lbalmaceda lbalmaceda linked an issue May 26, 2021 that may be closed by this pull request
@lbalmaceda lbalmaceda merged commit e39b5a8 into main May 27, 2021
@lbalmaceda lbalmaceda deleted the fix-trim branch May 27, 2021 11:03
@lbalmaceda lbalmaceda modified the milestones: v3-Next, 3.0.1 May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CH: Fixed small Small review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Entering a username with a space at the end crashes the app
2 participants