diff --git src/wp-admin/edit-comments.php src/wp-admin/edit-comments.php
index 8a004b5226..4a8f0eb831 100644
|
|
|
if ( $doaction ) { |
| 30 | 30 | */ |
| 31 | 31 | global $wpdb; |
| 32 | 32 | |
| 33 | | $comment_status = wp_unslash( $_REQUEST['comment_status'] ); |
| 34 | | $delete_time = wp_unslash( $_REQUEST['pagegen_timestamp'] ); |
| | 33 | $comment_status = isset( $_REQUEST['comment_status'] ) ? wp_unslash( $_REQUEST['comment_status'] ) : ''; |
| | 34 | $delete_time = isset( $_REQUEST['pagegen_timestamp'] ) ? wp_unslash( $_REQUEST['pagegen_timestamp'] ) : ''; |
| 35 | 35 | $comment_ids = $wpdb->get_col( |
| 36 | 36 | $wpdb->prepare( |
| 37 | 37 | "SELECT comment_ID FROM $wpdb->comments |
| … |
… |
if ( $doaction ) { |
| 150 | 150 | wp_safe_redirect( $redirect_to ); |
| 151 | 151 | exit; |
| 152 | 152 | } elseif ( ! empty( $_GET['_wp_http_referer'] ) ) { |
| 153 | | wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); |
| 154 | | exit; |
| | 153 | |
| | 154 | // Check REQUEST URI is set and not empty. |
| | 155 | if( isset( $_SERVER['REQUEST_URI'] ) && ! empty( $_SERVER['REQUEST_URI'] ) ) { |
| | 156 | wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); |
| | 157 | exit; |
| | 158 | } |
| 155 | 159 | } |
| 156 | 160 | |
| 157 | 161 | $wp_list_table->prepare_items(); |
diff --git src/wp-admin/load-styles.php src/wp-admin/load-styles.php
index 3bdfcc7a22..5152773a56 100644
|
|
|
require ABSPATH . WPINC . '/global-styles-and-settings.php'; |
| 29 | 29 | require ABSPATH . WPINC . '/script-loader.php'; |
| 30 | 30 | require ABSPATH . WPINC . '/version.php'; |
| 31 | 31 | |
| 32 | | $protocol = $_SERVER['SERVER_PROTOCOL']; |
| 33 | | if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0', 'HTTP/3' ), true ) ) { |
| 34 | | $protocol = 'HTTP/1.0'; |
| | 32 | // Check SERVER_PROTOCOL isset and not empty. |
| | 33 | if ( isset( $_SERVER['SERVER_PROTOCOL'] ) && ! empty( $_SERVER['SERVER_PROTOCOL'] ) ) { |
| | 34 | if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0', 'HTTP/3' ), true ) ) { |
| | 35 | $protocol = 'HTTP/1.0'; |
| | 36 | } |
| | 37 | } |
| | 38 | |
| | 39 | // Check Get Load Parameter isset and not empty. |
| | 40 | if ( ! isset( $_GET['load'] ) || empty( $_GET['load'] ) ) { |
| | 41 | $load = $_GET['load']; |
| 35 | 42 | } |
| 36 | 43 | |
| 37 | | $load = $_GET['load']; |
| 38 | 44 | if ( is_array( $load ) ) { |
| 39 | 45 | ksort( $load ); |
| 40 | 46 | $load = implode( '', $load ); |
diff --git src/wp-includes/class-wp-customize-manager.php src/wp-includes/class-wp-customize-manager.php
index 51c88ef5fc..4b721279b8 100644
|
|
|
final class WP_Customize_Manager { |
| 4575 | 4575 | * @return bool Whether the user agent is iOS. |
| 4576 | 4576 | */ |
| 4577 | 4577 | public function is_ios() { |
| 4578 | | return wp_is_mobile() && preg_match( '/iPad|iPod|iPhone/', $_SERVER['HTTP_USER_AGENT'] ); |
| | 4578 | // Check HTTP_USER_AGENT isset and not empty. |
| | 4579 | if( isset( $_SERVER['HTTP_USER_AGENT'] ) && ! empty( $_SERVER['HTTP_USER_AGENT'] ) ) { |
| | 4580 | return wp_is_mobile() && preg_match( '/iPad|iPod|iPhone/', $_SERVER['HTTP_USER_AGENT'] ); |
| | 4581 | } else { |
| | 4582 | // If HTTP_USER_AGENT is not set, assume not iOS. |
| | 4583 | return false; |
| | 4584 | } |
| 4579 | 4585 | } |
| 4580 | 4586 | |
| 4581 | 4587 | /** |
diff --git src/wp-includes/vars.php src/wp-includes/vars.php
index 22496330c3..1f5f01995e 100644
|
|
|
global $pagenow, |
| 28 | 28 | if ( is_admin() ) { |
| 29 | 29 | // wp-admin pages are checked more carefully. |
| 30 | 30 | if ( is_network_admin() ) { |
| 31 | | preg_match( '#/wp-admin/network/?(.*?)$#i', $_SERVER['PHP_SELF'], $self_matches ); |
| | 31 | |
| | 32 | // Check PHP_SELF isset before using it. |
| | 33 | if( isset( $_SERVER['PHP_SELF'] ) && ! empty( $_SERVER['PHP_SELF'] ) ) { |
| | 34 | preg_match( '#/wp-admin/network/?(.*?)$#i', $_SERVER['PHP_SELF'], $self_matches ); |
| | 35 | } |
| 32 | 36 | } elseif ( is_user_admin() ) { |
| 33 | | preg_match( '#/wp-admin/user/?(.*?)$#i', $_SERVER['PHP_SELF'], $self_matches ); |
| | 37 | // Check PHP_SELF isset before using it. |
| | 38 | if( isset( $_SERVER['PHP_SELF'] ) && ! empty( $_SERVER['PHP_SELF'] ) ) { |
| | 39 | preg_match( '#/wp-admin/user/?(.*?)$#i', $_SERVER['PHP_SELF'], $self_matches ); |
| | 40 | } |
| 34 | 41 | } else { |
| 35 | | preg_match( '#/wp-admin/?(.*?)$#i', $_SERVER['PHP_SELF'], $self_matches ); |
| | 42 | // Check PHP_SELF isset before using it. |
| | 43 | if( isset( $_SERVER['PHP_SELF'] ) && ! empty( $_SERVER['PHP_SELF'] ) ) { |
| | 44 | preg_match( '#/wp-admin/?(.*?)$#i', $_SERVER['PHP_SELF'], $self_matches ); |
| | 45 | } |
| 36 | 46 | } |
| 37 | 47 | |
| 38 | 48 | $pagenow = ! empty( $self_matches[1] ) ? $self_matches[1] : ''; |