| 1 |
<?php |
| 2 |
|
| 3 |
/* |
| 4 |
* This file is part of Raven. |
| 5 |
* |
| 6 |
* (c) Sentry Team |
| 7 |
* |
| 8 |
* For the full copyright and license information, please view the LICENSE |
| 9 |
* file that was distributed with this source code. |
| 10 |
*/ |
| 11 |
|
| 12 |
/** |
| 13 |
* This processor removes all the cookies from the request to ensure no sensitive |
| 14 |
* informations are sent to the server. |
| 15 |
* |
| 16 |
* @author Stefano Arlandini <sarlandini@alice.it> |
| 17 |
*/ |
| 18 |
final class Raven_Processor_RemoveCookiesProcessor extends Raven_Processor |
| 19 |
{ |
| 20 |
/** |
| 21 |
* {@inheritdoc} |
| 22 |
*/ |
| 23 |
public function process(&$data) |
| 24 |
{ |
| 25 |
if (isset($data['request'])) { |
| 26 |
if (isset($data['request']['cookies'])) { |
| 27 |
$data['request']['cookies'] = self::STRING_MASK; |
| 28 |
} |
| 29 |
|
| 30 |
if (isset($data['request']['headers']) && isset($data['request']['headers']['Cookie'])) { |
| 31 |
$data['request']['headers']['Cookie'] = self::STRING_MASK; |
| 32 |
} |
| 33 |
} |
| 34 |
} |
| 35 |
} |
| 36 |
|