From 07db64156e180c30daa5ab5d41ed72f9bba77e6d Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Thu, 25 Jun 2020 09:44:12 -0400 Subject: [RFC] Make string length for getTraceAsString() configurable Add a `zend.exception_string_param_max_len` ini setting. (same suffix as `log_errors_max_len`) Allow values between 0 and 1000000 bytes. For example, with zend.exception_string_param_max_len=0, "" would represent the empty string, and "..." would represent something longer than the empty string. Previously, this was hardcoded as exactly 15 bytes. Discussion: https://externals.io/message/110717 Closes GH-5769 --- php.ini-production | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'php.ini-production') diff --git a/php.ini-production b/php.ini-production index c6e83d5f09..a2a22506a4 100644 --- a/php.ini-production +++ b/php.ini-production @@ -159,6 +159,11 @@ ; Development Value: Off ; Production Value: On +; zend.exception_string_param_max_len +; Default Value: 15 +; Development Value: 15 +; Production Value: 0 + ;;;;;;;;;;;;;;;;;;;; ; php.ini Options ; ;;;;;;;;;;;;;;;;;;;; @@ -366,13 +371,23 @@ zend.enable_gc = On ;zend.script_encoding = ; Allows to include or exclude arguments from stack traces generated for exceptions -; In production, it is recommended to turn this setting on to prohibit the output +; In production, it is recommended to turn this setting on to prohibit the output ; of sensitive information in stack traces ; Default Value: Off ; Development Value: Off ; Production Value: On zend.exception_ignore_args = On +; Allows setting the maximum string length in an argument of a stringified stack trace +; to a value between 0 and 1000000. +; This has no effect when zend.exception_ignore_args is enabled. +; Default Value: 15 +; Development Value: 15 +; Production Value: 0 +; In production, it is recommended to set this to 0 to reduce the output +; of sensitive information in stack traces. +zend.exception_string_param_max_len = 0 + ;;;;;;;;;;;;;;;;; ; Miscellaneous ; ;;;;;;;;;;;;;;;;; -- cgit v1.2.1