[wp-trac] [WordPress Trac] #44317: wp_safe_redirect() and wp_redirect() shouldn't allow non-3xx status codes
WordPress Trac
noreply at wordpress.org
Fri May 31 14:35:13 UTC 2019
#44317: wp_safe_redirect() and wp_redirect() shouldn't allow non-3xx status codes
--------------------------------------+------------------------------
Reporter: johnbillion | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: good-first-bug has-patch | Focuses:
--------------------------------------+------------------------------
Changes (by mjnewman):
* keywords: needs-patch good-first-bug => good-first-bug has-patch
Comment:
Added check_http_status_code() function to check if an HTTP status code is
within a specific range, such as 3XX, or a multiple ranges, such as 2XX
and 3XX. Includes option to wp_die(). Returns the HTTP status code if it's
within the specified range.
Added check_http_status_code() to wp_redirect() after the
'wp_redirect_status' filter is applied.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44317#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list