RavenSanitizeCookieProcessor.php in Raven: Sentry Integration 7.3
Extend SanitizeDataProcessor to sanitize cookies.
File
RavenSanitizeCookieProcessor.phpView source
<?php
/**
* @file
* Extend SanitizeDataProcessor to sanitize cookies.
*/
/**
* Extend SanitizeDataProcessor to sanitize cookies.
*/
class RavenSanitizeCookieProcessor extends Raven_Processor_SanitizeDataProcessor {
/**
* {@inheritdoc}
*/
public function process(&$data) {
if (!empty($data['request'])) {
$this
->sanitizeHttp($data);
}
}
/**
* Sanitize cookies.
*/
public function sanitizeHttp(&$data) {
$http =& $data['request'];
if (!empty($http['cookies']) && is_array($http['cookies'])) {
$cookies =& $http['cookies'];
array_walk_recursive($cookies, array(
$this,
'sanitize',
));
}
}
}
Classes
Name | Description |
---|---|
RavenSanitizeCookieProcessor | Extend SanitizeDataProcessor to sanitize cookies. |