Skip to content

Commit b6bb05d

Browse files
committed
fixed regex - logging xml-strings and objects only.
1 parent a820f23 commit b6bb05d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/net/authorize/util/AuthorizedNetSensitiveTagsConfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
{
99
"tagName": "cardNumber",
10-
"pattern": "^(\\d+)(\\d{4})$",
10+
"pattern": "(\\d+)(\\d{4})",
1111
"replacement": "xxxx-$2",
1212
"disableMask": false
1313
},

lib/net/authorize/util/Log.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ private function maskSensitiveXmlString($rawString){
5050
if(trim($sensitiveTag->pattern)) {
5151
$inputPattern = $sensitiveTag->pattern;
5252
}
53-
$pattern = "/<" . $tag . ">". $inputPattern ."<\/" . $tag . ">/";
53+
$pattern = "/<" . $tag . ">(?:.*)". $inputPattern ."(?:.*)<\/" . $tag . ">/";
5454

5555
if(trim($sensitiveTag->replacement)) {
5656
$inputReplacement = $sensitiveTag->replacement;

0 commit comments

Comments
 (0)