Skip to content

Commit 787aca5

Browse files
Change secret regex (#488)
1 parent 1448dfc commit 787aca5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/uid2/shared/audit/Audit.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ private boolean validateNoSecrets(String fieldValue, String propertyName) {
171171
if (fieldValue == null || fieldValue.isEmpty()) {
172172
return true;
173173
}
174-
Pattern uid2_key_pattern = Pattern.compile("(UID2|EUID)-[A-Za-z]-[A-Za-z]-[A-Za-z0-9_-]+");
174+
Pattern uid2_key_pattern = Pattern.compile("(UID2|EUID)-[A-Za-z]-[A-Za-z]-[A-Za-z0-9_.-]{11,}");
175175
Matcher matcher = uid2_key_pattern.matcher(fieldValue);
176176
if(matcher.find()) {
177177
toJsonValidationErrorMessageBuilder.append(String.format("Secret found in the audit log: %s. ", propertyName));

0 commit comments

Comments
 (0)