Changeset 47612
- Timestamp:
- 04/22/2020 03:40:41 PM (5 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/deprecated.php
r47611 r47612 3984 3984 return wp_filter_content_tags( $content ); 3985 3985 } 3986 3987 /** 3988 * Turn register globals off. 3989 * 3990 * @since 2.1.0 3991 * @access private 3992 * @deprecated 5.5.0 3993 */ 3994 function wp_unregister_GLOBALS() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid 3995 // register_globals was deprecated in PHP 5.3 and removed entirely in PHP 5.4. 3996 _deprecated_function( __FUNCTION__, '5.5.0' ); 3997 } -
trunk/src/wp-includes/load.php
r47550 r47612 19 19 } 20 20 return $protocol; 21 }22 23 /**24 * Turn register globals off.25 *26 * @since 2.1.027 * @access private28 */29 function wp_unregister_GLOBALS() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid30 if ( ! ini_get( 'register_globals' ) ) {31 return;32 }33 34 if ( isset( $_REQUEST['GLOBALS'] ) ) {35 die( 'GLOBALS overwrite attempt detected' );36 }37 38 // Variables that shouldn't be unset.39 $no_unset = array( 'GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES', 'table_prefix' );40 41 $input = array_merge( $_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, isset( $_SESSION ) && is_array( $_SESSION ) ? $_SESSION : array() );42 foreach ( $input as $k => $v ) {43 if ( ! in_array( $k, $no_unset, true ) && isset( $GLOBALS[ $k ] ) ) {44 unset( $GLOBALS[ $k ] );45 }46 }47 21 } 48 22 -
trunk/src/wp-settings.php
r47568 r47612 67 67 // phpcs:ignore WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set 68 68 date_default_timezone_set( 'UTC' ); 69 70 // Turn register_globals off.71 wp_unregister_GLOBALS();72 69 73 70 // Standardize $_SERVER variables across setups.
Note: See TracChangeset
for help on using the changeset viewer.