Skip to content

Commit 7b4a4fe

Browse files
authored
_pad_term_counts() uses string-concatenated SQL without prepared statement
$object_types values are not individually escaped via $wpdb->prepare(). They use esc_sql() only at the get_taxonomy() call, but imploded directly into the query string. The array keys are integer IDs but are not cast. This should use prepare() with placeholders.
1 parent 917f5d4 commit 7b4a4fe

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

src/wp-includes/taxonomy.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4072,7 +4072,6 @@ function _pad_term_counts( &$terms, $taxonomy ) {
40724072
array_merge( array_keys( $term_ids ), $object_types )
40734073
)
40744074
);
4075-
40764075
foreach ( $results as $row ) {
40774076
$id = $term_ids[ $row->term_taxonomy_id ];
40784077

0 commit comments

Comments
 (0)