30 lines
527 B
Plaintext
30 lines
527 B
Plaintext
![]() |
Included variables may have been set by user input could contain unexpected, and potentially dangerous values.
|
||
|
|
||
|
|
||
|
== Noncompliant Code Example
|
||
|
|
||
|
----
|
||
|
include $foo;
|
||
|
require $foo;
|
||
|
include $foo . '/config.php';
|
||
|
require $foo . '/config.php';
|
||
|
include "$foo/config.php";
|
||
|
require "$foo/config.php";
|
||
|
include($foo);
|
||
|
require($foo);
|
||
|
include($foo . '/config.php');
|
||
|
require($foo . '/config.php');
|
||
|
include("$foo/config.php");
|
||
|
require("$foo/config.php");
|
||
|
|
||
|
include "./$page.php";
|
||
|
----
|
||
|
|
||
|
|
||
|
== Compliant Solution
|
||
|
|
||
|
----
|
||
|
include "./$page.php";
|
||
|
----
|
||
|
|