AmazeFileManager icon indicating copy to clipboard operation
AmazeFileManager copied to clipboard

Fix issue #4304

Open enescakar2148 opened this issue 1 year ago • 4 comments

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:

enescakar2148 avatar Dec 27 '24 12:12 enescakar2148

Please check CI.

EmmanuelMess avatar Mar 12 '25 22:03 EmmanuelMess

Any updates @enescakar2148 ? This is already approved.

EmmanuelMess avatar May 17 '25 16:05 EmmanuelMess

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

enescakar2148 avatar May 17 '25 17:05 enescakar2148

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

EmmanuelMess avatar May 21 '25 01:05 EmmanuelMess