diff --git a/admin/partials/rt-transcoder-admin-display.php b/admin/partials/rt-transcoder-admin-display.php index 3a333c31..5af85baa 100755 --- a/admin/partials/rt-transcoder-admin-display.php +++ b/admin/partials/rt-transcoder-admin-display.php @@ -8,7 +8,7 @@ * @subpackage Transcoder/Admin/Partials */ -$current_page = transcoder_filter_input( INPUT_GET, 'page', FILTER_SANITIZE_STRING ); +$current_page = transcoder_filter_input( INPUT_GET, 'page', FILTER_SANITIZE_FULL_SPECIAL_CHARS ); ?>
nofity_transcoding_failed( $job_id, $error_msg ); @@ -1183,7 +1183,7 @@ public function handle_callback() { } else { // To check if request is sumitted from the WP Job Manager plugin ( https://wordpress.org/plugins/wp-job-manager/ ). - $job_manager_form = transcoder_filter_input( INPUT_POST, 'job_manager_form', FILTER_SANITIZE_STRING ); + $job_manager_form = transcoder_filter_input( INPUT_POST, 'job_manager_form', FILTER_SANITIZE_FULL_SPECIAL_CHARS ); if ( isset( $job_id ) && ! empty( $job_id ) && class_exists( 'RTDBModel' ) && empty( $job_manager_form ) ) { @@ -1281,7 +1281,7 @@ public function hide_transcoding_notice() { * @since 1.0 */ public function enter_api_key() { - $apikey = transcoder_filter_input( INPUT_GET, 'apikey', FILTER_SANITIZE_STRING ); + $apikey = transcoder_filter_input( INPUT_GET, 'apikey', FILTER_SANITIZE_FULL_SPECIAL_CHARS ); if ( ! empty( $apikey ) ) { echo wp_json_encode( array( 'apikey' => $apikey ) ); } else { @@ -1641,16 +1641,16 @@ private function filter_transcoder_response() { $post_var = $_POST; // phpcs:ignore WordPress.Security.NonceVerification.Missing $filter_post_args = array( - 'job_id' => FILTER_SANITIZE_STRING, - 'job_type' => FILTER_SANITIZE_STRING, - 'job_for' => FILTER_SANITIZE_STRING, - 'format' => FILTER_SANITIZE_STRING, + 'job_id' => FILTER_SANITIZE_FULL_SPECIAL_CHARS, + 'job_type' => FILTER_SANITIZE_FULL_SPECIAL_CHARS, + 'job_for' => FILTER_SANITIZE_FULL_SPECIAL_CHARS, + 'format' => FILTER_SANITIZE_FULL_SPECIAL_CHARS, 'download_url' => FILTER_SANITIZE_URL, - 'file_name' => FILTER_SANITIZE_STRING, + 'file_name' => FILTER_SANITIZE_FULL_SPECIAL_CHARS, 'thumb_count' => FILTER_SANITIZE_NUMBER_INT, - 'status' => FILTER_SANITIZE_STRING, - 'error_msg' => FILTER_SANITIZE_STRING, - 'error_code' => FILTER_SANITIZE_STRING, + 'status' => FILTER_SANITIZE_FULL_SPECIAL_CHARS, + 'error_msg' => FILTER_SANITIZE_FULL_SPECIAL_CHARS, + 'error_code' => FILTER_SANITIZE_FULL_SPECIAL_CHARS, ); $post_array = filter_input_array( INPUT_POST, $filter_post_args ); diff --git a/inc/helpers/custom-functions.php b/inc/helpers/custom-functions.php index 36f1c885..27a547b6 100644 --- a/inc/helpers/custom-functions.php +++ b/inc/helpers/custom-functions.php @@ -38,7 +38,7 @@ function transcoder_filter_input( $type, $variable_name, $filter = FILTER_DEFAUL * Code is not running on PHP Cli and we are in clear. * Use the PHP method and bail out. */ - if ( ! empty( $sanitized_variable ) && FILTER_SANITIZE_STRING === $filter ) { + if ( ! empty( $sanitized_variable ) && FILTER_SANITIZE_FULL_SPECIAL_CHARS === $filter ) { $sanitized_variable = sanitize_text_field( $sanitized_variable ); }