Я создаю один пользовательский плагин и отправляю для просмотра на WordPress.org. Но журнал дайте мне тестирование, они говорят небезопасные вызовы SQL < /p>
`includes/databases/class-stepup-user-crud.php:313 $sql_orders = $wpdb->prepare(
"
SELECT p.*
FROM {$db->tb_posts} p
INNER JOIN {$db->tb_postmeta} pm ON p.ID = pm.post_id AND meta_key = %s AND (meta_value = %d OR meta_value like '%s')
",
'_user_id',
$user_id,
$user_id_str
);
includes/databases/class-stepup-user-crud.php:338 $sql = $sql_orders /* . ' UNION ' . $sql_guest_orders */ . $sql_rest;
includes/databases/class-stepup-user-crud.php:341 $order_posts = $db->wpdb->get_results($sql);
# There is a call to a wpdb::prepare() function, that's correct.
# You cannot add variables like "$db->tb_posts" directly to the SQL query.
# Using wpdb::prepare($query, $args) you will need to include placeholders for each variable within the query and include the variables in the second parameter.
# The SQL query needs to be included in a wpdb::prepare($query, $args) function.`
< /code>
Я добавил $ db-> tb_posts в глобальном классе.You cannot add variables like "$db->tb_posts" directly to the SQL query
Я создаю один пользовательский плагин и отправляю для просмотра на WordPress.org. Но журнал дайте мне тестирование, они говорят небезопасные вызовы SQL < /p> [code]`includes/databases/class-stepup-user-crud.php:313 $sql_orders = $wpdb->prepare( " SELECT p.* FROM {$db->tb_posts} p INNER JOIN {$db->tb_postmeta} pm ON p.ID = pm.post_id AND meta_key = %s AND (meta_value = %d OR meta_value like '%s') ", '_user_id', $user_id, $user_id_str ); includes/databases/class-stepup-user-crud.php:338 $sql = $sql_orders /* . ' UNION ' . $sql_guest_orders */ . $sql_rest; includes/databases/class-stepup-user-crud.php:341 $order_posts = $db->wpdb->get_results($sql); # There is a call to a wpdb::prepare() function, that's correct. # You cannot add variables like "$db->tb_posts" directly to the SQL query. # Using wpdb::prepare($query, $args) you will need to include placeholders for each variable within the query and include the variables in the second parameter. # The SQL query needs to be included in a wpdb::prepare($query, $args) function.` < /code> Я добавил $ db-> tb_posts в глобальном классе.You cannot add variables like "$db->tb_posts" directly to the SQL query [/code] Пожалуйста, помогите мне. Я прочитал этот контент https://www.wordfence.com/blog/2025/08/how-to-find-sql-incement-vulnerabiets own-wordpress-lugins-and-temes/образно это, но не найдено правильным решением.