From d4436ce1d2b7b5f18bb39f5bfed7025a316137c3 Mon Sep 17 00:00:00 2001 From: Olga Gleckler Date: Tue, 17 Oct 2023 21:51:57 +0300 Subject: [PATCH] Disallow text string handling as a parameter p --- src/wp-includes/class-wp-query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-query.php b/src/wp-includes/class-wp-query.php index a9ed269d72244..a33963e1f079b 100644 --- a/src/wp-includes/class-wp-query.php +++ b/src/wp-includes/class-wp-query.php @@ -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 {