Skip to content

Commit

Permalink
Remove sensitive info from headers
Browse files Browse the repository at this point in the history
  • Loading branch information
barryvdh committed Sep 9, 2015
1 parent c20f7cf commit 89a88cf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/DataCollector/SymfonyRequestCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ public function collect()
$data['session_attributes'] = $sessionAttributes;
}

foreach ($data['request_server'] as $key => $value) {
if (str_is('*_KEY', $key) || str_is('*_PASSWORD', $key) || str_is('*_SECRET', $key)) {
$data['request_server'][$key] = '******';
}
}

if (isset($data['request_headers']['php-auth-pw'])) {
$data['request_headers']['php-auth-pw'] = '******';
}
Expand Down

0 comments on commit 89a88cf

Please sign in to comment.