Skip to content

Commit

Permalink
Disallow text string handling as a parameter p
Browse files Browse the repository at this point in the history
  • Loading branch information
OlaIola committed Oct 17, 2023
1 parent 12dc9ca commit d4436ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-query.php
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ public function parse_query( $query = '' ) {
$this->is_favicon = true;
}

if ( ! is_scalar( $qv['p'] ) || (int) $qv['p'] < 0 ) {
if ( ! is_numeric( $qv['p'] ) || (int) $qv['p'] < 0 ) {
$qv['p'] = 0;
$qv['error'] = '404';
} else {
Expand Down

0 comments on commit d4436ce

Please sign in to comment.