Skip to content

Commit

Permalink
Improve PHP security recommendations (#2423)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
3 people authored and mnocon committed Jul 8, 2024
1 parent 9cb9d04 commit ae27b09
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion docs/guide/security_checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,27 @@ Such arguments could include passwords or other sensitive information.
You should also make sure no stack trace is ever visible to end users of production sites,
though visible arguments are unsafe even if the stack traces only show up in log files.

## eZ Platform
### Disable error output from PHP

Symfony in production mode prevents exception messages from being visible to end users.
However, if Symfony fails to boot properly, such exceptions may end up being visible, including stack traces.
This can be prevented by [disabling error message output in PHP](https://www.php.net/manual/en/language.errors.basics.php).
These `php.ini` configuration values should be used on production sites.
When using [[= product_name_cloud =]], the same settings can be configured in [[= product_name =]]'s `.platform.app.yaml` file.

```ini
display_errors = Off
display_startup_errors = Off
```

### Other PHP settings

Consider what other security related settings are relevant for your needs.
The [OWASP PHP Configuration Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/PHP_Configuration_Cheat_Sheet.html)
contains several recommendations, but be aware that they may be out of date as they don't mention PHP 8.
See also [PHP's own security manual](https://www.php.net/manual/en/security.php).

## [[= product_name =]]

### Fully-vetted admin users

Expand Down

0 comments on commit ae27b09

Please sign in to comment.