mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Merge pull request #7677 from mmcev106/master
This commit is contained in:
commit
28c5f9c9d3
@ -677,6 +677,12 @@ function array_product(array $array) {}
|
||||
* 259 is FILTER_VALIDATE_FLOAT
|
||||
* @psalm-taint-escape ($filter is 259 ? 'html' : null)
|
||||
*
|
||||
* 519 is FILTER_SANITIZE_NUMBER_INT
|
||||
* @psalm-taint-escape ($filter is 519 ? 'html' : null)
|
||||
*
|
||||
* 520 is FILTER_SANITIZE_NUMBER_FLOAT
|
||||
* @psalm-taint-escape ($filter is 520 ? 'html' : null)
|
||||
*
|
||||
* @psalm-flow ($value, $filter, $options) -> return
|
||||
*/
|
||||
function filter_var(mixed $value, int $filter = FILTER_DEFAULT, array|int $options = 0): mixed {}
|
||||
|
@ -232,7 +232,8 @@ class TaintTest extends TestCase
|
||||
],
|
||||
'taintFilterVarInt' => [
|
||||
'code' => '<?php
|
||||
echo filter_var($_GET["bad"], FILTER_VALIDATE_INT);'
|
||||
echo filter_var($_GET["bad"], FILTER_VALIDATE_INT);
|
||||
echo filter_var($_GET["bad"], FILTER_SANITIZE_NUMBER_INT);'
|
||||
],
|
||||
'taintFilterVarBoolean' => [
|
||||
'code' => '<?php
|
||||
@ -240,7 +241,8 @@ class TaintTest extends TestCase
|
||||
],
|
||||
'taintFilterVarFloat' => [
|
||||
'code' => '<?php
|
||||
echo filter_var($_GET["bad"], FILTER_VALIDATE_FLOAT);'
|
||||
echo filter_var($_GET["bad"], FILTER_VALIDATE_FLOAT);
|
||||
echo filter_var($_GET["bad"], FILTER_SANITIZE_NUMBER_FLOAT);'
|
||||
],
|
||||
'taintLdapEscape' => [
|
||||
'code' => '<?php
|
||||
|
Loading…
Reference in New Issue
Block a user