Opened 7 years ago
Closed 7 years ago
#37572 closed enhancement (fixed)
When wp-mail.php is disabled, it returns 500 instead of a more appropriate 403 response
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | 4.5.3 |
Component: | Keywords: | has-patch | |
Focuses: | Cc: |
Description
To reproduce:
- Add this to a theme or a plugin:
add_filter('enable_post_by_email_configuration', function () { return false; });
- Visit
/wp-mail.php
You will get a 500 Internal Server Error.
500 responses are reserved for an "unexpected condition" and therefore are monitored closely by sysadmins. Using 500 responses inappropriately wastes sysadmin time by forcing them to write a rule to ignore 500 responses coming from /wp-mail.php
.
A 403 Forbidden status code would be more appropriate as it indicates that "the request is for something forbidden" which is exactly what the message says ("This action has been disabled by the administrator.").
Attachments (1)
Change History (6)
Note: See
TracTickets for help on using
tickets.
This would be it, i guess.