* fixed CVE-2024-12276;

* reviewed using $wpdb and WPCS;
* set minimum required version to 6.2 due to using %i for $wpdb->prepare;
This commit is contained in:
Mykyta Synelnikov
2025-02-03 16:17:37 +02:00
parent 26c8aa21e1
commit 4adbe19cbe
19 changed files with 249 additions and 194 deletions
+3 -4
View File
@@ -89,13 +89,12 @@ if ( ! class_exists( 'um\core\Query' ) ) {
"SELECT *
FROM {$wpdb->posts}
WHERE post_type = 'page' AND
post_status = 'publish'",
OBJECT
post_status = 'publish'"
);
$array = array();
if( $wpdb->num_rows > 0 ){
foreach ($pages as $page_data) {
if ( $wpdb->num_rows > 0 ) {
foreach ( $pages as $page_data ) {
$array[ $page_data->ID ] = $page_data->post_title;
}
}