
When an include is not surrounded by empty lines, its content is inlined on the same line as the adjacent content. That can lead to broken tags and other display issues. This PR fixes all such includes and introduces a validation step that forbids introducing the same problem again.
78 lines
1.3 KiB
Plaintext
78 lines
1.3 KiB
Plaintext
include::../description.adoc[]
|
|
|
|
include::../ask-yourself.adoc[]
|
|
|
|
include::../recommended.adoc[]
|
|
|
|
== Sensitive Code Example
|
|
|
|
CakePHP 1.x, 2.x:
|
|
|
|
[source,php]
|
|
----
|
|
Configure::write('debug', 1); // Sensitive: development mode
|
|
or
|
|
Configure::write('debug', 2); // Sensitive: development mode
|
|
or
|
|
Configure::write('debug', 3); // Sensitive: development mode
|
|
----
|
|
|
|
CakePHP 3.0:
|
|
|
|
[source,php]
|
|
----
|
|
use Cake\Core\Configure;
|
|
|
|
Configure::config('debug', true); // Sensitive: development mode
|
|
----
|
|
|
|
WordPress:
|
|
|
|
[source,php]
|
|
----
|
|
define( 'WP_DEBUG', true ); // Sensitive: development mode
|
|
----
|
|
|
|
== Compliant Solution
|
|
|
|
CakePHP 1.2:
|
|
|
|
[source,php]
|
|
----
|
|
Configure::write('debug', 0); // Compliant; this is the production mode
|
|
----
|
|
|
|
CakePHP 3.0:
|
|
|
|
[source,php]
|
|
----
|
|
use Cake\Core\Configure;
|
|
|
|
Configure::config('debug', false); // Compliant: "0" or "false" for CakePHP 3.x is suitable (production mode) to not leak sensitive data on the logs.
|
|
----
|
|
|
|
WordPress:
|
|
|
|
[source,php]
|
|
----
|
|
define( 'WP_DEBUG', false ); // Compliant
|
|
----
|
|
|
|
include::../see.adoc[]
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::../comments-and-links.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|