Skip to content

Commit aa8d5b3

Browse files
committed
Never log password value #7366
1 parent 4084186 commit aa8d5b3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Log/EventCompleter.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,17 @@ private function getEnvData(): array
7272
return $envData;
7373
}
7474

75+
/**
76+
* Remove password value from GraphQL variables well-known structure
77+
*/
7578
protected function removeSensitiveData(array $request): array
7679
{
80+
foreach ($request as &$r) {
81+
if (is_array($r)) {
82+
unset($r['variables']['password']);
83+
}
84+
}
85+
7786
return $request;
7887
}
7988

0 commit comments

Comments
 (0)