Skip to content
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

Forgotten password #694

Open
GoogleCodeExporter opened this issue Jul 15, 2015 · 1 comment
Open

Forgotten password #694

GoogleCodeExporter opened this issue Jul 15, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Forgotten password -> input user id and email address -> search
2. Email send to user's email and input the verification code
3. Prompt for input new password and confirm new password
4. click change password

What is the expected output? What do you see instead?
Expected output => password change success
What do you see instead => 5001 ERROR_WRONGPASSWORD (cannot set password for 
user, old password is not available)

What version of PWM are you using?
1.7.1

What ldap directory and version are you using?
Oracle Directory Server 7

Please paste any error log messages below:
2015-06-02 15:03:00, TRACE, rest.RestCheckPasswordServer, {1,z08993} real-time 
password validator called for uid=z08993 [10.108.42.36]
  process time: 4ms
  passwordCheckInfo string: {"version":2,"strength":46,"match":"MATCH","message":"New password accepted, please click change password","passed":true,"errorCode":0}
2015-06-02 15:03:02, TRACE, util.PwmPasswordRuleValidator, calling chai 
directory password validation checker
2015-06-02 15:03:02, TRACE, servlet.ChangePasswordServlet, {1,z08993} wrote 
password to changePasswordBean [10.108.42.36]
2015-06-02 15:03:02, TRACE, util.MacroMachine, replaced Macro @User:ID@ with 
value: z08993
2015-06-02 15:03:02, DEBUG, server.RestServerHelper, {1,z08993} REST WebService 
Request: GET request for: /pwm/public/rest/app-data/client (no params)  
[10.108.42.36]
2015-06-02 15:03:02, TRACE, servlet.ChangePasswordServlet, {1,z08993} retrieved 
password from server session [10.108.42.36]
2015-06-02 15:03:02, TRACE, util.PwmPasswordRuleValidator, calling chai 
directory password validation checker
2015-06-02 15:03:02, DEBUG, servlet.ChangePasswordServlet, 5001 
ERROR_WRONGPASSWORD (cannot set password for user, old password is not 
available)

NOTE: I saw the code in PasswordUtility.setUserPassword and found the following 
code. Debugging get oldPassword = null. Don't know if I am missing some 
configuration.

       // retrieve the user's old password from the userInfoBean in the session
        final String oldPassword = pwmSession.getUserInfoBean().getUserCurrentPassword();

        boolean setPasswordWithoutOld = false;
        if (oldPassword == null || oldPassword.length() < 1) {
            if (pwmApplication.getProxyChaiProvider().getDirectoryVendor() == ChaiProvider.DIRECTORY_VENDOR.MICROSOFT_ACTIVE_DIRECTORY) {
                setPasswordWithoutOld = true;
            }
        }

Original issue reported on code.google.com by [email protected] on 2 Jun 2015 at 7:12

@GoogleCodeExporter
Copy link
Author

       // retrieve the user's old password from the userInfoBean in the session
        final String oldPassword = pwmSession.getUserInfoBean().getUserCurrentPassword();

        boolean setPasswordWithoutOld = false;
        if (oldPassword == null || oldPassword.length() < 1) {
            if (pwmApplication.getProxyChaiProvider().getDirectoryVendor() == ChaiProvider.DIRECTORY_VENDOR.MICROSOFT_ACTIVE_DIRECTORY) {
                setPasswordWithoutOld = true;
            }
        }

        if (!setPasswordWithoutOld) {
            // Check to make sure we actually have an old password
            if (oldPassword == null || oldPassword.length() < 1) {
                final String errorMsg = "cannot set password for user, old password is not available";
                final ErrorInformation errorInformation = new ErrorInformation(PwmError.ERROR_WRONGPASSWORD, errorMsg);
                throw new PwmOperationalException(errorInformation);
            }
        }

Original comment by [email protected] on 2 Jun 2015 at 7:27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant