Skip to content

Fix issue #4304#4316

Merged
EmmanuelMess merged 6 commits into
TeamAmaze:release/4.0from
enescakar2148:fix-password-validation
Mar 26, 2026
Merged

Fix issue #4304#4316
EmmanuelMess merged 6 commits into
TeamAmaze:release/4.0from
enescakar2148:fix-password-validation

Conversation

@enescakar2148
Copy link
Copy Markdown
Contributor

@enescakar2148 enescakar2148 commented Dec 27, 2024

Description

The cause of the error is that the password validaion logic runs for both password fields at the same time. When entering the first password, the second password field is empty, which causes the 'passwords do not match' error. This can be fixed by updating the code as follows:

Fixes #4304

Issue tracker

Changes made:

The logic for the first password field validation has been updated:
• If the first password is not empty, proceed.
• If the second password field is empty or if the passwords match, proceed.
• If the file name is valid, proceed with “OK”.

Error conditions:
• If the first password is empty: “field_empty” error.
• If the second password is entered and does not match: “password_no_match” error.
• If the file name is invalid: “empty_string” error.

With this change:
• No error will be shown when entering the first password.
• When entering the second password, the matching check will be performed.
• If the passwords do not match, an error will be shown.

This improves the user experience by avoiding unnecessary error messages when entering the first password, and only showing the mismatch error when the second password is entered.

Contributors:

…d validation logic runs for both password fields at the same time. When entering the first password, the second password field is empty, which causes the 'passwords do not match' error. This can be fixed by updating the code as follows:
Copy link
Copy Markdown
Member

@VishnuSanal VishnuSanal left a comment

Choose a reason for hiding this comment

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

@enescakar2148 thanks for your interest in contributiong to amaze! one formatting change, and your're done, this PR LGTM 🚀

Comment thread .vscode/settings.json Outdated
Copy link
Copy Markdown
Member

@VishnuSanal VishnuSanal left a comment

Choose a reason for hiding this comment

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

Pls revert the changes/additions made to the JSON file.

VishnuSanal
VishnuSanal previously approved these changes Dec 31, 2024
Copy link
Copy Markdown
Member

@VishnuSanal VishnuSanal left a comment

Choose a reason for hiding this comment

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

LGTM 🚀 keep going!

@VishnuSanal VishnuSanal added the PR-Awaiting-Final-Review this PR is awaiting a final review/approval label Dec 31, 2024
EmmanuelMess
EmmanuelMess previously approved these changes Mar 12, 2025
@EmmanuelMess
Copy link
Copy Markdown
Member

Please check CI.

@EmmanuelMess
Copy link
Copy Markdown
Member

Any updates @enescakar2148 ? This is already approved.

@enescakar2148
Copy link
Copy Markdown
Contributor Author

Unfortunately, I couldn't add an update because I was working too hard. I hope I can make new additions as soon as possible🙏

@EmmanuelMess EmmanuelMess added PR-Requested-Changes this PR is awaiting an update from the author and removed PR-Awaiting-Final-Review this PR is awaiting a final review/approval labels May 17, 2025
@EmmanuelMess
Copy link
Copy Markdown
Member

Okay, the test that is not passing is EncryptAuthenticateDialogTest::testPasswordValidations.

@VishnuSanal
Copy link
Copy Markdown
Member

any updates here @enescakar2148, thanks!

@VishnuSanal VishnuSanal added the Needs-OPResponse Needs original poster to respond label Mar 22, 2026
@EmmanuelMess EmmanuelMess dismissed stale reviews from VishnuSanal and themself via 160c411 March 25, 2026 23:52
@EmmanuelMess
Copy link
Copy Markdown
Member

I had always assumed tests to be somewhat selftesting, it seems this one was wrong for quite a while though.

@EmmanuelMess EmmanuelMess merged commit d2e8d7d into TeamAmaze:release/4.0 Mar 26, 2026
4 checks passed
@enescakar2148 enescakar2148 deleted the fix-password-validation branch March 26, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs-OPResponse Needs original poster to respond PR-Requested-Changes this PR is awaiting an update from the author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect feedback message 'Password doesn't match' appears after entering only the first password field

3 participants