1.2.455. Filter Not Raw

Report usage of filter functions with the FILTER_RAW_UNSAFE option. This option is the default one.

<?php

// default to FILTER_RAW_UNSAFE
filter_var($a);

// explicit no filter
filter_var($a, FILTER_RAW_UNSAFE);

?>

1.2.455.1. Suggestions

  • Use a different filter to validate those data.

1.2.455.2. Specs

Short name

Security/FilterNotRaw

Rulesets

All, Changed Behavior, Security

Exakat since

2.5.1

PHP Version

All

Severity

Minor

Time To Fix

Quick (30 mins)

Precision

High

Features

filter

Available in

Entreprise Edition, Exakat Cloud