31 lines
456 B
Plaintext
31 lines
456 B
Plaintext
include::../description.adoc[]
|
|
|
|
== Noncompliant Code Example
|
|
|
|
----
|
|
$data = $_GET["data"];
|
|
eval("echo \$data;");
|
|
----
|
|
|
|
== Compliant Solution
|
|
|
|
----
|
|
$data = $_GET["data"];
|
|
if (in_array($data, $whitelist)) {
|
|
eval("echo \$data;");
|
|
}
|
|
----
|
|
|
|
include::../see.adoc[]
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
include::../highlighting.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|