$controllerClass can contain request data and is used in code execution context(s) leading to a potential security vulnerability.
1 path for user data to reach this point
filter_input_array(INPUT_SERVER)['REQUEST_URI'] seems to return tainted data, and $url is assigned
in
src/Core/Request.php on line 25
$url is passed through explode(), and $url is assigned
in
src/Core/Request.php on line 33
$url[0] is passed through trim(), and trim($url[0]) is passed through trim(), and $url is assigned
in
src/Core/Request.php on line 34
$url is passed through explode(), and $partList is assigned
in
src/Core/Request.php on line 36
$partList is passed through implode(), and Request::$route is assigned
in
src/Core/Request.php on line 60
Tainted property Request::$route is read
in
src/Core/Request.php on line 109
Request::route() returns tainted data, and $request->route() is passed through preg_replace(), and $route is assigned
in
src/Core/DefaultRoute.php on line 26
$route is passed through str_replace(), and $controllerClass is assigned
in
src/Core/DefaultRoute.php on line 30
General Strategies to prevent injection
In general, it is advisable to prevent any user-data to reach this point. This can be done by
white-listing certain values:
if ( ! in_array($value, array('this-is-allowed', 'and-this-too'), true)) {
throw new \InvalidArgumentException('This input is not allowed.');
}
For numeric data, we recommend to explicitly cast the data:
$sanitized = (integer) $tainted;
Loading history...
36
} else {
37
throw new \RuntimeException(sprintf('The class "%s" does not exist', $controllerClass));
$controllerClass
can contain request data and is used in code execution context(s) leading to a potential security vulnerability.1 path for user data to reach this point
filter_input_array(INPUT_SERVER)['REQUEST_URI']
seems to return tainted data, and$url
is assignedin src/Core/Request.php on line 25
$url
is passed through explode(), and$url
is assignedin src/Core/Request.php on line 33
$url[0]
is passed through trim(), andtrim($url[0])
is passed through trim(), and$url
is assignedin src/Core/Request.php on line 34
$url
is passed through explode(), and$partList
is assignedin src/Core/Request.php on line 36
$partList
is passed through implode(), and Request::$route is assignedin src/Core/Request.php on line 60
in src/Core/Request.php on line 109
$request->route()
is passed through preg_replace(), and$route
is assignedin src/Core/DefaultRoute.php on line 26
$route
is passed through str_replace(), and$controllerClass
is assignedin src/Core/DefaultRoute.php on line 30
General Strategies to prevent injection
In general, it is advisable to prevent any user-data to reach this point. This can be done by white-listing certain values:
For numeric data, we recommend to explicitly cast the data: