Skip to content

Commit

Permalink
Sanitize 'context' parameter
Browse files Browse the repository at this point in the history
It's currently only used in conditions, but plan ahead.
  • Loading branch information
joedolson committed Nov 17, 2023
1 parent 7bc46a5 commit dade53e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/my-calendar-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function mc_format_api( $data, $format ) {
mc_api_format_csv( $data );
break;
case 'ical':
$context = ( isset( $_GET['context'] ) ) ? $_GET['context'] : 'google';
$context = ( isset( $_GET['context'] ) ) ? sanitize_text_field( $_GET['context'] ) : 'google';
mc_api_format_ical( $data, $context );
break;
}
Expand Down

0 comments on commit dade53e

Please sign in to comment.