From a7edef876dcf7ab6c729fbb6bab8f87decc44791 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 30 Aug 2022 15:17:08 +0000 Subject: [PATCH] General: Ensure bookmark query limits are numeric. Props paulkevan, xknown. Built from https://develop.svn.wordpress.org/trunk@53959 git-svn-id: http://core.svn.wordpress.org/trunk@53518 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/bookmark.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/bookmark.php b/wp-includes/bookmark.php index 97197e3d05..37a25a80f6 100644 --- a/wp-includes/bookmark.php +++ b/wp-includes/bookmark.php @@ -307,7 +307,7 @@ function get_bookmarks( $args = '' ) { $query .= " $exclusions $inclusions $search"; $query .= " ORDER BY $orderby $order"; if ( -1 != $parsed_args['limit'] ) { - $query .= ' LIMIT ' . $parsed_args['limit']; + $query .= ' LIMIT ' . absint( $parsed_args['limit'] ); } $results = $wpdb->get_results( $query ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 8e9bee69cd..047301bac0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-53958'; +$wp_version = '6.1-alpha-53959'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.