Skip to content
Browse files

Merge pull request #38 from jturmel/add_authorization_to_sanitize

Add 'authorization' to SanitizeDataProcessor
  • Loading branch information...
2 parents f2787cb + c719cd5 commit 51bdeaa36967658259dd59ff831d2541dfedc302 @dcramer dcramer committed Oct 6, 2012
Showing with 3 additions and 1 deletion.
  1. +1 −1 lib/Raven/SanitizeDataProcessor.php
  2. +2 −0 test/Raven/Tests/SanitizeDataProcessorTest.php
View
2 lib/Raven/SanitizeDataProcessor.php
@@ -8,7 +8,7 @@
class Raven_SanitizeDataProcessor extends Raven_Processor
{
const MASK = '********';
- const FIELDS_RE = '/(password|passwd|secret)/i';
+ const FIELDS_RE = '/(authorization|password|passwd|secret)/i';
const VALUES_RE = '/^\d{16}$/';
function apply($value, $fn, $key=null) {
View
2 test/Raven/Tests/SanitizeDataProcessorTest.php
@@ -21,6 +21,7 @@ public function testDoesFilterHttpData()
'the_secret' => 'hello',
'a_password_here' => 'hello',
'mypasswd' => 'hello',
+ 'authorization' => 'Basic dXNlcm5hbWU6cGFzc3dvcmQ='
),
)
);
@@ -35,6 +36,7 @@ public function testDoesFilterHttpData()
$this->assertEquals($vars['the_secret'], Raven_SanitizeDataProcessor::MASK);
$this->assertEquals($vars['a_password_here'], Raven_SanitizeDataProcessor::MASK);
$this->assertEquals($vars['mypasswd'], Raven_SanitizeDataProcessor::MASK);
+ $this->assertEquals($vars['authorization'], Raven_SanitizeDataProcessor::MASK);
}
public function testDoesFilterCreditCard()

0 comments on commit 51bdeaa

Please sign in to comment.
Something went wrong with that request. Please try again.