[php-src] PR #18215: Change default setting for zend.exception_ignore_args
| From: | andrewnicols | Date: | Tue, 01 Apr 2025 06:59:00 +0000 |
| Subject: | [php-src] PR #18215: Change default setting for zend.exception_ignore_args | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-31275@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/18215
Author: andrewnicols
The default setting for
zend.exception_ignore_args (On) should be the safest setting
rather than the setting more convenient to developers (Off).
This setting was introduced in PHP 7.4 to hide arguments passed into methods which cause a
stacktrace to be displayed.
It is not _well_ documented in the PHP documentation and many people are unaware of its purpose.
Whilst it is not a perfect solution, where a production site does display a stack trace it would be
best to do so _without_ all args being dispalyed.
In this case I feel that PHP should fail _safe_ and require that developers actively _disable_ this
setting when they _do_ want args (either in php.ini, or through ini_set() calls).
Happy to raise this as an RFC if this is required -- I'm uncertain whether this change requires
one from reading the RFC documentation.