mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Change taint path names to prepare for allowing array key tainting
This commit is contained in:
parent
9ad88256d1
commit
937e68cc75
@ -264,7 +264,7 @@ class ArrayAnalyzer
|
||||
$data_flow_graph->addPath(
|
||||
$parent_node,
|
||||
$new_parent_node,
|
||||
'array-assignment'
|
||||
'arrayvalue-assignment'
|
||||
);
|
||||
}
|
||||
|
||||
@ -379,7 +379,7 @@ class ArrayAnalyzer
|
||||
$data_flow_graph->addPath(
|
||||
$parent_node,
|
||||
$new_parent_node,
|
||||
'array-assignment'
|
||||
'arrayvalue-assignment'
|
||||
. ($item_key_value !== null ? '-\'' . $item_key_value . '\'' : ''),
|
||||
$added_taints,
|
||||
$removed_taints
|
||||
|
@ -405,14 +405,14 @@ class ArrayAssignmentAnalyzer
|
||||
$statements_analyzer->data_flow_graph->addPath(
|
||||
$child_parent_node,
|
||||
$parent_node,
|
||||
'array-assignment-\'' . $key_value->value . '\''
|
||||
'arrayvalue-assignment-\'' . $key_value->value . '\''
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$statements_analyzer->data_flow_graph->addPath(
|
||||
$child_parent_node,
|
||||
$parent_node,
|
||||
'array-assignment'
|
||||
'arrayvalue-assignment'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -365,7 +365,7 @@ class ArrayFetchAnalyzer
|
||||
$var_location = new CodeLocation($statements_analyzer->getSource(), $var);
|
||||
|
||||
$new_parent_node = DataFlowNode::getForAssignment(
|
||||
$keyed_array_var_id ?: 'array-fetch',
|
||||
$keyed_array_var_id ?: 'arrayvalue-fetch',
|
||||
$var_location
|
||||
);
|
||||
|
||||
@ -381,7 +381,7 @@ class ArrayFetchAnalyzer
|
||||
$statements_analyzer->data_flow_graph->addPath(
|
||||
$parent_node,
|
||||
$new_parent_node,
|
||||
'array-fetch' . ($dim_value !== null ? '-\'' . $dim_value . '\'' : ''),
|
||||
'arrayvalue-fetch' . ($dim_value !== null ? '-\'' . $dim_value . '\'' : ''),
|
||||
$added_taints,
|
||||
$removed_taints
|
||||
);
|
||||
@ -390,7 +390,7 @@ class ArrayFetchAnalyzer
|
||||
$statements_analyzer->data_flow_graph->addPath(
|
||||
$new_parent_node,
|
||||
$parent_node,
|
||||
'array-assignment' . ($dim_value !== null ? '-\'' . $dim_value . '\'' : ''),
|
||||
'arrayvalue-assignment' . ($dim_value !== null ? '-\'' . $dim_value . '\'' : ''),
|
||||
$added_taints,
|
||||
$removed_taints
|
||||
);
|
||||
|
@ -260,7 +260,7 @@ class TaintFlowGraph extends DataFlowGraph
|
||||
continue;
|
||||
}
|
||||
|
||||
if (self::shouldIgnoreFetch($path_type, 'array', $generated_source->path_types)) {
|
||||
if (self::shouldIgnoreFetch($path_type, 'arrayvalue', $generated_source->path_types)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ class VariableUseGraph extends DataFlowGraph
|
||||
continue;
|
||||
}
|
||||
|
||||
if (self::shouldIgnoreFetch($path_type, 'array', $generated_source->path_types)) {
|
||||
if (self::shouldIgnoreFetch($path_type, 'arrayvalue', $generated_source->path_types)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user