Skip to content

Commit ecd1d3c

Browse files
authored
fix new line in redact (Stirling-Tools#6035)
1 parent 0a098cf commit ecd1d3c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

app/proprietary/src/main/java/stirling/software/proprietary/security/configuration/SecurityConfiguration.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,13 @@ public HttpFirewall httpFirewall() {
159159
firewall.setAllowedHeaderValues(
160160
headerValue -> headerValue != null && allowedChars.matcher(headerValue).matches());
161161

162-
// Apply the same rules to parameter values for consistency.
162+
// Allow non-ASCII characters and newlines in parameter values.
163+
Pattern allowedParamChars =
164+
Pattern.compile("[\\p{IsAssigned}&&[^\\p{IsControl}]\\r\\n]*");
163165
firewall.setAllowedParameterValues(
164166
parameterValue ->
165-
parameterValue != null && allowedChars.matcher(parameterValue).matches());
167+
parameterValue != null
168+
&& allowedParamChars.matcher(parameterValue).matches());
166169
return firewall;
167170
}
168171

0 commit comments

Comments
 (0)