Skip to content

Commit

Permalink
Query: Remove the static query property.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
whyisjake committed Oct 14, 2019
1 parent c83ea95 commit f82ed75
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions wp-includes/class-wp-query.php
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,6 @@ public function fill_query_vars( $array ) {
'attachment',
'attachment_id',
'name',
'static',
'pagename',
'page_id',
'second',
Expand Down Expand Up @@ -802,7 +801,7 @@ public function parse_query( $query = '' ) {
// If year, month, day, hour, minute, and second are set, a single
// post is being queried.
$this->is_single = true;
} elseif ( '' != $qv['static'] || '' != $qv['pagename'] || ! empty( $qv['page_id'] ) ) {
} elseif ( '' != $qv['pagename'] || ! empty( $qv['page_id'] ) ) {
$this->is_page = true;
$this->is_single = false;
} else {
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/class-wp.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class WP {
* @since 2.0.0
* @var string[]
*/
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' );
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' );

/**
* Private query variables.
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.2.4-alpha-46473';
$wp_version = '5.2.4-alpha-46479';

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

0 comments on commit f82ed75

Please sign in to comment.