Skip to content

Commit f82ed75

Browse files
committed
Query: Remove the static query property.
Prevent unauthenticated views of publicly queryables content types. Props aaroncampbell, whyisjake, nickdaugherty, xknown. Built from https://develop.svn.wordpress.org/branches/5.2@46479 git-svn-id: http://core.svn.wordpress.org/branches/5.2@46277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent c83ea95 commit f82ed75

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

Diff for: wp-includes/class-wp-query.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,6 @@ public function fill_query_vars( $array ) {
538538
'attachment',
539539
'attachment_id',
540540
'name',
541-
'static',
542541
'pagename',
543542
'page_id',
544543
'second',
@@ -802,7 +801,7 @@ public function parse_query( $query = '' ) {
802801
// If year, month, day, hour, minute, and second are set, a single
803802
// post is being queried.
804803
$this->is_single = true;
805-
} elseif ( '' != $qv['static'] || '' != $qv['pagename'] || ! empty( $qv['page_id'] ) ) {
804+
} elseif ( '' != $qv['pagename'] || ! empty( $qv['page_id'] ) ) {
806805
$this->is_page = true;
807806
$this->is_single = false;
808807
} else {

Diff for: wp-includes/class-wp.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class WP {
1414
* @since 2.0.0
1515
* @var string[]
1616
*/
17-
public $public_query_vars = array( 'm', 'p', 'posts', 'w', 'cat', 'withcomments', 'withoutcomments', 's', 'search', 'exact', 'sentence', 'calendar', 'page', 'paged', 'more', 'tb', 'pb', 'author', 'order', 'orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'tag', 'feed', 'author_name', 'static', 'pagename', 'page_id', 'error', 'attachment', 'attachment_id', 'subpost', 'subpost_id', 'preview', 'robots', 'taxonomy', 'term', 'cpage', 'post_type', 'embed' );
17+
public $public_query_vars = array( 'm', 'p', 'posts', 'w', 'cat', 'withcomments', 'withoutcomments', 's', 'search', 'exact', 'sentence', 'calendar', 'page', 'paged', 'more', 'tb', 'pb', 'author', 'order', 'orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'tag', 'feed', 'author_name', 'pagename', 'page_id', 'error', 'attachment', 'attachment_id', 'subpost', 'subpost_id', 'preview', 'robots', 'taxonomy', 'term', 'cpage', 'post_type', 'embed' );
1818

1919
/**
2020
* Private query variables.

Diff for: wp-includes/version.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* @global string $wp_version
1515
*/
16-
$wp_version = '5.2.4-alpha-46473';
16+
$wp_version = '5.2.4-alpha-46479';
1717

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

0 commit comments

Comments
 (0)