Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support longer creditcard numbers #635

Merged
merged 2 commits into from
Aug 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Raven/Processor/SanitizeDataProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Raven_Processor_SanitizeDataProcessor extends Raven_Processor
{
const MASK = self::STRING_MASK;
const FIELDS_RE = '/(authorization|password|passwd|secret|password_confirmation|card_number|auth_pw)/i';
const VALUES_RE = '/^(?:\d[ -]*?){13,16}$/';
const VALUES_RE = '/^(?:\d[ -]*?){13,19}$/';

protected $fields_re;
protected $values_re;
Expand Down
2 changes: 1 addition & 1 deletion test/Raven/Tests/Processor/SanitizeDataProcessorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function testSettingProcessorOptions()
$processor = new Raven_Processor_SanitizeDataProcessor($client);

$this->assertEquals($processor->getFieldsRe(), '/(authorization|password|passwd|secret|password_confirmation|card_number|auth_pw)/i', 'got default fields');
$this->assertEquals($processor->getValuesRe(), '/^(?:\d[ -]*?){13,16}$/', 'got default values');
$this->assertEquals($processor->getValuesRe(), '/^(?:\d[ -]*?){13,19}$/', 'got default values');

$options = array(
'fields_re' => '/(api_token)/i',
Expand Down