rfc:redact_parameters_in_back_traces
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:redact_parameters_in_back_traces [2022/02/23 13:30] – Close Vote timwolla | rfc:redact_parameters_in_back_traces [2022/06/13 09:15] (current) – Add the PR that applied the attribute to the existing functions. timwolla | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2022-01-10 | * Date: 2022-01-10 | ||
* Author: Tim Düsterhus, duesterhus@woltlab.com | * Author: Tim Düsterhus, duesterhus@woltlab.com | ||
- | * Status: | + | * Status: |
+ | * Target Version: PHP 8.2 | ||
+ | * Implementation: | ||
* First Published at: http:// | * First Published at: http:// | ||
Line 445: | Line 447: | ||
Prototype patch: https:// | Prototype patch: https:// | ||
+ | |||
+ | ===== Errata ===== | ||
+ | |||
+ | During code review it was noticed that the proposed serialization behavior of < | ||
+ | |||
+ | * https:// | ||
+ | * https:// | ||
+ | |||
+ | Compared to the proposal a userland implementation of < | ||
+ | |||
+ | <PHP> | ||
+ | <?php | ||
+ | |||
+ | final class SensitiveParameterValue | ||
+ | { | ||
+ | public function __construct(private readonly mixed $value) {} | ||
+ | |||
+ | public function getValue(): mixed { return $value; } | ||
+ | |||
+ | /* Hide the value from var_dump(). */ | ||
+ | public function __debugInfo(): | ||
+ | |||
+ | /* Prevent serialization. */ | ||
+ | public function __serialize(): | ||
+ | throw new \Exception(' | ||
+ | } | ||
+ | |||
+ | /* Prevent unserialization. */ | ||
+ | public function __unserialize(array $data): void { | ||
+ | throw new \Exception(' | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Note that the < | ||
===== Implementation ===== | ===== Implementation ===== | ||
- | n/a | + | This was merged into PHP 8.2 in https:// |
+ | |||
+ | The attribute was applied to existing functions in https:// | ||
===== References ===== | ===== References ===== |
rfc/redact_parameters_in_back_traces.1645623006.txt.gz · Last modified: 2022/02/23 13:30 by timwolla