You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.
Describe the bug
When I try to change my password but my password policies don't accept the new password (ex. password too recent), the error message I get is "Failed due to password complex policies: New password length is shorter than AD minimum password length".
To Reproduce
Steps to reproduce the behavior:
Have a Windows Server (2019) with default security policies
Change the password of user 'test'
Install PassCore
Try to change the password of user 'test' again
Expected behavior
There should have been an error message saying there was an error due to my password policies, instead of a message "my new password is too short"
Desktop (please complete the following information):
OS: Arch Linux
Browser: Mozilla Firefox
Version: 91.0.1
Additional context
It seems to be because when there is a PasswordException during the password change, it returns the same error as when the password is too short:
I noted that behavior as well and solved it with a custom error message. But if you could distinguish the errors itself, then I guess one should have also two different error messages to display to the user...
Yes I think aveing something like ApiErrorCode.TooShortPassword for the first and ApiErrorCode.ComplexPassword for the other could allow a different error message in the UI. If you want I can make a pull request for this change
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
PassCore Server
Describe the bug
When I try to change my password but my password policies don't accept the new password (ex. password too recent), the error message I get is "Failed due to password complex policies: New password length is shorter than AD minimum password length".
To Reproduce
Steps to reproduce the behavior:
Expected behavior
There should have been an error message saying there was an error due to my password policies, instead of a message "my new password is too short"
Desktop (please complete the following information):
Additional context
It seems to be because when there is a PasswordException during the password change, it returns the same error as when the password is too short:
passcore/src/Unosquare.PassCore.PasswordProvider/PasswordChangeProvider.cs
Lines 106 to 113 in cd559d3
When the password is too short:
passcore/src/Unosquare.PassCore.PasswordProvider/PasswordChangeProvider.cs
Lines 56 to 61 in cd559d3
The text was updated successfully, but these errors were encountered: