#10453 closed defect (bug) (worksforme)
authentication errors from plugins sometimes get suppressed
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 2.8.1 |
| Component: | Security | Keywords: | reporter-feedback |
| Focuses: | Cc: |
Description
I've noticed that the new authentication code in WP 2.8 sometimes suppresses error messages from plugins which implement the 'authenticate' hook. This happens on wp-login.php when both the username and password fields are left empty.
The included patch does two things:
- modifies
wp_authenticate_username_passwordto maintain existing WP_Error object if present. Also changes howwp_signonclears out the 'empty_username' and 'empty_password' errors, to ensure that any others are maintained (this last part could be made cleaner ifWP_Errorexposed aremovemethod) - modifies the 'login_errors' and 'login_messages' filter calls in
wp-login.phpto pass the raw$wp_errorsobject as an optional second parameter
Attachments (2)
Change History (7)
#2
@
16 years ago
wnorris, I don't think you've quite made the case for this patch.
Also changes how wp_signon clears out the 'empty_username' and 'empty_password' errors, to ensure that any others are maintained
As I understand the existing code, WordPress does not clear out the empty_username and empty_password items if other errors are present. This is made fairly obvious by the patch's attempt to unset errors in the context of an authentication failure. If you think there's a sane way to do that, it needs to be explained and documented.
renamed file by wnorris - for visibility