WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/13/2019 10:19:34 PM (3 months ago)
Author:
jorbin
Message:

GENERAL: Remove magic quote functions

The path to magic quote sanity took a fun and exciting turn: PHP core removed it and WordPress updated the minimum version.

For the formally external pclzip, the code is commented out to make investigating easier and in case we ever need to merge upstream (if that still exists) changes.

Props ayeshrajans, jrf, jorbin.
See #47783.
Fixes #18322.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/class-wp-rest-request.php

    r45932 r46105  
    691691
    692692        /*
    693          * Amazingly, parse_str follows magic quote rules. Sigh.
    694          *
    695          * NOTE: Do not refactor to use `wp_unslash`.
    696          */
    697         if ( get_magic_quotes_gpc() ) {
    698             $params = stripslashes_deep( $params );
    699         }
    700 
    701         /*
    702693         * Add to the POST parameters stored internally. If a user has already
    703694         * set these manually (via `set_body_params`), don't override them.
Note: See TracChangeset for help on using the changeset viewer.