Skip to content

Commit

Permalink
Mark Context hidden values as SensitiveParameter
Browse files Browse the repository at this point in the history
  • Loading branch information
onlime committed Jun 27, 2024
1 parent ca55a7a commit b16b64a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Illuminate/Log/Context/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Illuminate\Support\Traits\Conditionable;
use Illuminate\Support\Traits\Macroable;
use RuntimeException;
use SensitiveParameter;
use Throwable;

class Repository
Expand Down Expand Up @@ -193,7 +194,7 @@ public function add($key, $value = null)
* @param mixed $value
* @return $this
*/
public function addHidden($key, $value = null)
public function addHidden($key, #[SensitiveParameter] $value = null)
{
$this->hidden = array_merge(
$this->hidden,
Expand Down Expand Up @@ -256,7 +257,7 @@ public function addIf($key, $value)
* @param mixed $value
* @return $this
*/
public function addHiddenIf($key, $value)
public function addHiddenIf($key, #[SensitiveParameter] $value)
{
if (! $this->hasHidden($key)) {
$this->addHidden($key, $value);
Expand Down

0 comments on commit b16b64a

Please sign in to comment.