1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Add $_REQUEST as a taint source

Ref #3636
This commit is contained in:
Brown 2020-06-22 17:16:06 -04:00
parent f2f5606ca8
commit 7f05b3c530

View File

@ -361,7 +361,11 @@ class VariableFetchAnalyzer
$codebase = $statements_analyzer->getCodebase();
if ($codebase->taint && $codebase->config->trackTaintsInPath($statements_analyzer->getFilePath())) {
if ($var_name === '$_GET' || $var_name === '$_POST' || $var_name === '$_COOKIE') {
if ($var_name === '$_GET'
|| $var_name === '$_POST'
|| $var_name === '$_COOKIE'
|| $var_name === '$_REQUEST'
) {
$taint_location = new CodeLocation($statements_analyzer->getSource(), $stmt);
$server_taint_source = new Source(