1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-13 09:47:29 +01:00
psalm/docs/running_psalm/issues/TaintedXpath.md

13 lines
251 B
Markdown
Raw Normal View History

2023-08-31 05:20:39 +02:00
# TaintedXpath
2023-08-30 17:22:14 +02:00
2023-11-22 11:10:23 +01:00
Emitted when user-controlled input can be passed into a xpath query.
2023-08-30 17:22:14 +02:00
```php
<?php
function queryExpression(SimpleXMLElement $xml) : array|false|null {
$expression = $_GET["expression"];
return $xml->xpath($expression);
}
```