[wp-trac] [WordPress Trac] #44317: wp_safe_redirect() and wp_redirect() shouldn't allow non-3xx status codes

WordPress Trac noreply at wordpress.org
Sun Nov 3 22:09:08 UTC 2019


#44317: wp_safe_redirect() and wp_redirect() shouldn't allow non-3xx status codes
-------------------------------------------------+-------------------------
 Reporter:  johnbillion                          |       Owner:
                                                 |  johnbillion
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  5.4
Component:  General                              |     Version:
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  good-first-bug has-patch needs-      |     Focuses:
  testing has-unit-tests                         |
-------------------------------------------------+-------------------------
Changes (by jorbin):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"46641" 46641]:
 {{{
 #!CommitTicketReference repository="" revision="46641"
 General: wp_safe_redirect() and wp_redirect() shouldn't allow non-3xx
 status codes

 Redirects should use redirect status codes and if you attempt to call
 wp_safe_redirect or wp_redirect with a non redirect status it can lead to
 undesired behavior and head scratching.

 Fixes #44317.
 Props spenserhale, johnbillion, mjnewman for initial patch.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44317#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list