Skip to content

Commit

Permalink
replace deprecated FILTER_SANITIZE_STRING (#126) (#127)
Browse files Browse the repository at this point in the history
In the following method check_theme_file() URL sanitization is applied,
so we can either use FILTER_SANITIZE_URL here as well or simply pass
USAFE_RAW in this case.
  • Loading branch information
stklcode committed Oct 2, 2023
1 parent e55943c commit 9119201
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/class-antivirus.php
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ public static function get_ajax_response() {

case 'check_theme_file':
if ( ! empty( $_POST['_theme_file'] ) ) {
$theme_file = filter_var( wp_unslash( $_POST['_theme_file'] ), FILTER_SANITIZE_STRING );
$theme_file = filter_var( wp_unslash( $_POST['_theme_file'] ), FILTER_UNSAFE_RAW );
$lines = AntiVirus_CheckInternals::check_theme_file( $theme_file );
if ( $lines ) {
foreach ( $lines as $num => $line ) {
Expand Down

0 comments on commit 9119201

Please sign in to comment.