You are here

class RavenSanitizeCookieProcessor in Raven: Sentry Integration 7.3

Extend SanitizeDataProcessor to sanitize cookies.

Hierarchy

Expanded class hierarchy of RavenSanitizeCookieProcessor

1 string reference to 'RavenSanitizeCookieProcessor'
raven_get_client in ./raven.module
Returns the Sentry PHP client instance, or NULL if it could not be created.

File

./RavenSanitizeCookieProcessor.php, line 11
Extend SanitizeDataProcessor to sanitize cookies.

View source
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',
      ));
    }
  }

}

Members