[wp-trac] [WordPress Trac] #57670: Invalid return type for wp_get_raw_referer()

WordPress Trac noreply at wordpress.org
Sun May 14 16:58:33 UTC 2023


#57670: Invalid return type for wp_get_raw_referer()
-------------------------------------------------+-------------------------
 Reporter:  xknown                               |       Owner:
                                                 |  johnbillion
     Type:  defect (bug)                         |      Status:  accepted
 Priority:  normal                               |   Milestone:  6.3
Component:  General                              |     Version:  4.6
 Severity:  normal                               |  Resolution:
 Keywords:  php81 has-patch has-unit-tests       |     Focuses:
  commit                                         |
-------------------------------------------------+-------------------------
Changes (by azaozz):

 * keywords:  php81 has-patch has-unit-tests => php81 has-patch has-unit-
     tests commit


Comment:

 > even if we can only reproduce it via security tools, I think this is
 something we need to fix

 +1. Thanks for catching this and for the PR!

 > My understanding is that `_wp_http_referer`, like `HTTP_REFERER`, should
 always be a string.

 Yep, that's right. As far as I know `_wp_http_referer` is intended as a
 replacement for `HTTP_REFERER` and is used for redirects (in combination
 with `wp_safe_redirect()`). It can either be a string or not set.

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


More information about the wp-trac mailing list