Skip to content

Commit

Permalink
Escape the $s global.
Browse files Browse the repository at this point in the history
fixes #32142.

Built from https://develop.svn.wordpress.org/trunk@32298


git-svn-id: http://core.svn.wordpress.org/trunk@32269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
nacin committed Apr 27, 2015
1 parent 35c0c59 commit 5a84e32
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions wp-includes/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -494,12 +494,18 @@ function locate_template($template_names, $load = false, $require_once = true )
function load_template( $_template_file, $require_once = true ) {
global $posts, $post, $wp_did_header, $wp_query, $wp_rewrite, $wpdb, $wp_version, $wp, $id, $comment, $user_ID;

if ( is_array( $wp_query->query_vars ) )
if ( is_array( $wp_query->query_vars ) ) {
extract( $wp_query->query_vars, EXTR_SKIP );
}

if ( isset( $s ) ) {
$s = esc_attr( $s );
}

if ( $require_once )
if ( $require_once ) {
require_once( $_template_file );
else
} else {
require( $_template_file );
}
}

2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-alpha-32297';
$wp_version = '4.3-alpha-32298';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit 5a84e32

Please sign in to comment.