File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/main/java/com/uid2/shared/audit Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ static class AuditRecord {
3333 private final JsonObject actor ;
3434 private final String uidTraceId ;
3535 private final JsonObject queryParams ;
36- private final String uidInstanceId ;
36+ private String uidInstanceId ;
3737 private final String requestBody ;
3838 private final StringBuilder toJsonValidationErrorMessageBuilder = new StringBuilder ();
3939 @ Getter
@@ -72,6 +72,9 @@ public JsonObject toJson() {
7272 }
7373
7474 if (uidInstanceId != null && validateId (uidInstanceId , "uid_instance_id" )) {
75+ if (uidInstanceId .length () > 100 ) {
76+ uidInstanceId = uidInstanceId .substring (0 , 100 );
77+ }
7578 json .put ("uid_instance_id" , uidInstanceId );
7679 }
7780 actor .put ("id" , this .getLogIdentifier (json ));
@@ -197,6 +200,8 @@ private boolean validateNoSQL(String fieldValue, String propertyName) {
197200 }
198201
199202 private boolean validateId (String uidId , String propertyName ) {
203+
204+
200205
201206 if (!validateNoSecrets (uidId , propertyName )) {
202207 toJsonValidationErrorMessageBuilder .append (String .format ("Malformed %s found in the audit log: it contains secrets. " , propertyName ));
You can’t perform that action at this time.
0 commit comments