Skip to content

Commit

Permalink
Sanitize tags query variable as a string, not as an array
Browse files Browse the repository at this point in the history
  • Loading branch information
sheabunge committed May 13, 2022
1 parent 32dea96 commit 34e1c43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion php/class-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ private function search_by_line_callback( $snippet ) {
* @ignore
*/
private function tags_filter_callback( $snippet ) {
$tags = explode( ',', array_map( 'sanitize_text_field', $_GET['tag'] ) );
$tags = explode( ',', sanitize_text_field( $_GET['tag'] ) );

foreach ( $tags as $tag ) {
if ( in_array( $tag, $snippet->tags, true ) ) {
Expand Down

0 comments on commit 34e1c43

Please sign in to comment.