{"record":{"id":"ad4a36190671e4ad","repo":"octobercms/october","slug":"current-password-does-not-match-please-try-again","errorCode":null,"errorMessage":"Current password does not match. Please try again!","messagePattern":"Current password does not match\\. Please try again!","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/backend/controllers/AuthGates.php","lineNumber":68,"sourceCode":"            'current_password' => 'required|between:4,255',\n            'password' => 'required|between:4,255|confirmed|different:current_password',\n            'password_confirmation' => 'required_with:password|between:4,255'\n        ];\n\n        $validation = Validator::make(post(), $rules, [], [\n            'current_password' => __(\"Current Password\"),\n            'password' => __(\"New Password\"),\n            'password_confirmation' => __(\"Confirm Password\"),\n        ]);\n\n        if ($validation->fails()) {\n            throw new ValidationException($validation);\n        }\n\n        $user = $this->user;\n\n        if (!$user || !$user->checkPassword(post('current_password'))) {\n            throw new ApplicationException(__(\"Current password does not match. Please try again!\"));\n        }\n\n        // Validate password against policy\n        $user->validatePasswordPolicy(post('password'));\n\n        // Reset the user password and clear any code used to reset the password\n        $user->password = post('password');\n        $user->password_changed_at = $user->freshTimestamp();\n        $user->is_password_expired = false;\n        $user->reset_password_code = null;\n        $user->forceSave();\n\n        // Clear throttles\n        BackendAuth::clearThrottleForUserId($user->id);\n\n        Flash::success(__(\"Password has been reset. You may now sign in.\"));\n\n        return Backend::redirect('backend/auth/signin');","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/controllers/AuthGates.php#L50-L86","documentation":"Validation failure inside AuthGates::expired_onSubmit (the expired-password / forced reset flow): the posted current_password does not match the user's actual password. The Validator rules (current_password required) passed, but the subsequent user lookup/password check rejected the supplied current password.","triggerScenarios":"Thrown at modules/backend/controllers/AuthGates.php:68 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retype the current password correctly (it is the pre-reset credential, not the new one)","If forgotten, use the password restore flow instead of the expired-password form","Ensure the form field maps to current_password and is not pre-filled incorrectly"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","contentChangedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}