[wp-trac] [WordPress Trac] #38073: Remove any usage of wp_reset_vars()

WordPress Trac noreply at wordpress.org
Wed May 1 17:59:19 UTC 2024


#38073: Remove any usage of wp_reset_vars()
------------------------------+-----------------------------
 Reporter:  swissspidy        |       Owner:  swissspidy
     Type:  enhancement       |      Status:  closed
 Priority:  low               |   Milestone:  6.6
Component:  General           |     Version:  4.9
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |     Focuses:  administration
------------------------------+-----------------------------
Changes (by swissspidy):

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


Comment:

 In [changeset:"58069" 58069]:
 {{{
 #!CommitTicketReference repository="" revision="58069"
 General: Remove any usage of `wp_reset_vars()`.

 The way `wp_reset_vars()` sets global variables based on `$_POST` and
 `$_GET` values makes code hard to understand and maintain. It also makes
 it easy to forget to sanitize input.

 This change removes the few places where `wp_reset_vars()` is used in the
 admin to explicitly use `$_REQUEST` and sanitize any input.

 Props swissspidy, audrasjb, davideferre, killua99, weijland,
 voldemortensen.
 Fixes #38073.
 }}}

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


More information about the wp-trac mailing list