{"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":"Error \"Current password does not match. Please try again!\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/backend/controllers/AuthGates.php:68 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}