Skip to content

Commit 89a88cf

Browse files
committed
Remove sensitive info from headers
1 parent c20f7cf commit 89a88cf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/DataCollector/SymfonyRequestCollector.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ public function collect()
109109
$data['session_attributes'] = $sessionAttributes;
110110
}
111111

112+
foreach ($data['request_server'] as $key => $value) {
113+
if (str_is('*_KEY', $key) || str_is('*_PASSWORD', $key) || str_is('*_SECRET', $key)) {
114+
$data['request_server'][$key] = '******';
115+
}
116+
}
117+
112118
if (isset($data['request_headers']['php-auth-pw'])) {
113119
$data['request_headers']['php-auth-pw'] = '******';
114120
}

0 commit comments

Comments
 (0)