Skip to content

Commit ae27b09

Browse files
glyeadriendupuisjulitafalcondusza
authored andcommitted
Improve PHP security recommendations (#2423)
* Improve PHP security recommendations * Vale suggestion fixup * Vale suggestion fixup * Product name fixes Co-authored-by: Adrien Dupuis <[email protected]> * Ini code Co-authored-by: Adrien Dupuis <[email protected]> * Wording Co-authored-by: julitafalcondusza <[email protected]> --------- Co-authored-by: Adrien Dupuis <[email protected]> Co-authored-by: julitafalcondusza <[email protected]>
1 parent 9cb9d04 commit ae27b09

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

docs/guide/security_checklist.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,27 @@ Such arguments could include passwords or other sensitive information.
4949
You should also make sure no stack trace is ever visible to end users of production sites,
5050
though visible arguments are unsafe even if the stack traces only show up in log files.
5151

52-
## eZ Platform
52+
### Disable error output from PHP
53+
54+
Symfony in production mode prevents exception messages from being visible to end users.
55+
However, if Symfony fails to boot properly, such exceptions may end up being visible, including stack traces.
56+
This can be prevented by [disabling error message output in PHP](https://www.php.net/manual/en/language.errors.basics.php).
57+
These `php.ini` configuration values should be used on production sites.
58+
When using [[= product_name_cloud =]], the same settings can be configured in [[= product_name =]]'s `.platform.app.yaml` file.
59+
60+
```ini
61+
display_errors = Off
62+
display_startup_errors = Off
63+
```
64+
65+
### Other PHP settings
66+
67+
Consider what other security related settings are relevant for your needs.
68+
The [OWASP PHP Configuration Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/PHP_Configuration_Cheat_Sheet.html)
69+
contains several recommendations, but be aware that they may be out of date as they don't mention PHP 8.
70+
See also [PHP's own security manual](https://www.php.net/manual/en/security.php).
71+
72+
## [[= product_name =]]
5373

5474
### Fully-vetted admin users
5575

0 commit comments

Comments
 (0)