7f7dc9b07c02499ab2dfc1b0b5f2c740f321cd93
RedactingFormatter::collect() only added a sensitive key's value to the secret list when it was a string or Stringable. When the value was an array, addSecret() silently dropped it, so none of its leaf strings were collected. PsrLogMessageProcessor json-encodes array context values when interpolating them into the message, so a secret nested that way could already be sitting in the message in plain text by the time this formatter ran, and the output sweep had nothing to remove it with. Add collectSensitiveValue() to walk a sensitive key's value and collect every string leaf, however deeply nested, and use it instead of calling addSecret() directly.
Description
My contributions to Seldaek/monolog: 2 commits, 1 merged PRs
59 KiB
0 Stars
1 Watchers
0 Forks
Languages
PHP
100%