mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 11:23:10 +02:00
fix new line in redact (#6035)
This commit is contained in:
+5
-2
@@ -159,10 +159,13 @@ public class SecurityConfiguration {
|
|||||||
firewall.setAllowedHeaderValues(
|
firewall.setAllowedHeaderValues(
|
||||||
headerValue -> headerValue != null && allowedChars.matcher(headerValue).matches());
|
headerValue -> headerValue != null && allowedChars.matcher(headerValue).matches());
|
||||||
|
|
||||||
// Apply the same rules to parameter values for consistency.
|
// Allow non-ASCII characters and newlines in parameter values.
|
||||||
|
Pattern allowedParamChars =
|
||||||
|
Pattern.compile("[\\p{IsAssigned}&&[^\\p{IsControl}]\\r\\n]*");
|
||||||
firewall.setAllowedParameterValues(
|
firewall.setAllowedParameterValues(
|
||||||
parameterValue ->
|
parameterValue ->
|
||||||
parameterValue != null && allowedChars.matcher(parameterValue).matches());
|
parameterValue != null
|
||||||
|
&& allowedParamChars.matcher(parameterValue).matches());
|
||||||
return firewall;
|
return firewall;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user