Skip to content

Commit 746ee77

Browse files
committed
code review changes
* Fix the regex for card.?numb * Add a comment to remind ourselves to keep the code and pod in sync. * fix some POD wording.
1 parent b9aa5d9 commit 746ee77

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/Dancer2/Core/Error.pm

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ has censor => (
8282
return eval '\&'.$custom;
8383
}
8484

85+
# reminder: update POD below if changing the config here
8586
my $data_censor = use_module('Data::Censor')->new(
86-
sensitive_fields => qr/pass|card?num|pan|secret/i,
87+
sensitive_fields => qr/pass|card.?num|pan|secret/i,
8788
replacement => "Hidden (looks potentially sensitive)",
8889
);
8990

@@ -539,13 +540,13 @@ The message of the error page.
539540
540541
=attr censor
541542
542-
The function to use to censor error messages. By default it uses the C<censor> method of L<Data::Censor> C<_censor>"
543+
The function to use to censor error messages. By default it uses the C<censor> method of L<Data::Censor>"
543544
544545
# default censor function used by `error_censor`
545546
# is equivalent to
546547
sub MyApp::censor {
547548
Data::Censor->new(
548-
sensitive_fields => qr/pass|card?num|pan|secret/i,
549+
sensitive_fields => qr/pass|card.?num|pan|secret/i,
549550
replacement => "Hidden (looks potentially sensitive)",
550551
)->censor(@_);
551552
}

0 commit comments

Comments
 (0)