-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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 error rendering bug in 'Change Password' form #1743
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Sakshi Uppoor <sakshiuppoor@gmail.com>
Wow, I totally overlooked that one... Great that you found it! CI is running now, will merge once it passes! 👍 |
This was referenced Apr 7, 2022
This was referenced May 11, 2022
This was referenced Oct 13, 2022
This was referenced Oct 20, 2022
This was referenced Oct 28, 2022
This was referenced Nov 14, 2022
This was referenced Nov 17, 2022
This was referenced Dec 1, 2022
This was referenced Dec 20, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1733
The error is not being displayed because the hidden condition is:
juice-shop/frontend/src/app/change-password/change-password.component.html
Line 17 in 57b5d56
This condition always remains
true
becausepasswordControl.dirty
always remains true. This is due to the fact that whenever the server returns an error, thenresetPasswords()
is called, which only setsnewPasswordControl
andrepeatNewPasswordControl
to untouched & pristine and notpasswordControl
. Therefore,passwordControl
always remains dirty.juice-shop/frontend/src/app/change-password/change-password.component.ts
Lines 52 to 57 in 5315f9c
To solve this issue, I shifted lines 62 and 63 to
resetPasswords()
juice-shop/frontend/src/app/change-password/change-password.component.ts
Lines 60 to 74 in 5315f9c
Tested on:
OS: Windows 10
Browser: Google Chrome - Version 94.0.4606.81 (Official Build) (64-bit)