php-src icon indicating copy to clipboard operation
php-src copied to clipboard

Redacting parameters in back traces could be configurable

Open mvorisek opened this issue 4 years ago • 3 comments

Description

This is a feature request. Redacting parameters in back traces should be configureable by php.ini.

For development/debugging purposes, hiding any info from the user is undesired and should be printed unredacted as before https://wiki.php.net/rfc/redact_parameters_in_back_traces.

mvorisek avatar Apr 16 '22 07:04 mvorisek

This RFC proposes a \SensitiveParameterValue object as the replacement value [...] Furthermore the replacement object will store the original value, allowing it to retrieve it on explicit request, while making it hard to accidentally expose it.

It's already possible. This should be a feature request for whatever error handler you're using. IMO ini setting is too easy to enable in this case.

KapitanOczywisty avatar Apr 17 '22 20:04 KapitanOczywisty

I agree with @KapitanOczywisty. The people who benefit from SensitiveParameter the most are the people with bad configurations. If the debug configuration disables redacting sensitive parameters a large portion of the RFC is nullified. If you're in a local environment it's easy to use a debugger or dump the value to verify it. Anyway, the RFC was voted on without this feature. If you think it should be added feel free to pursue the RFC process.

iluuu1994 avatar Apr 17 '22 22:04 iluuu1994

Closing this one, let's see how much limitation is this in practise (from developer perspective) and how many other people want this feature.

mvorisek avatar Apr 17 '22 22:04 mvorisek