35 lines
539 B
Plaintext
35 lines
539 B
Plaintext
include::../description.adoc[]
|
|
|
|
== Noncompliant Code Example
|
|
|
|
[source,php]
|
|
----
|
|
$value = $_GET["value"];
|
|
header("X-Header: $value"); // Noncompliant
|
|
----
|
|
|
|
== Compliant Solution
|
|
|
|
[source,php]
|
|
----
|
|
$value = $_GET["value"];
|
|
if (ctype_alnum($value)) {
|
|
header("X-Header: $value"); // Compliant
|
|
} else {
|
|
// Error
|
|
}
|
|
----
|
|
|
|
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[]
|