mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-06-21 23:15:03 +00:00
Introduced protections against HTTP header injection / smuggling attacks
This commit is contained in:
parent
4fa280303d
commit
ea18125693
@ -121,7 +121,7 @@ public class UserBasedRateLimitingFilter extends OncePerRequestFilter {
|
|||||||
if (probe.isConsumed()) {
|
if (probe.isConsumed()) {
|
||||||
response.setHeader(
|
response.setHeader(
|
||||||
"X-Rate-Limit-Remaining",
|
"X-Rate-Limit-Remaining",
|
||||||
stripNewlines(Newlines.stripAll(Long.toString(probe.getRemainingTokens()))));
|
Newlines.stripAll(stripNewlines(Newlines.stripAll(Long.toString(probe.getRemainingTokens())))));
|
||||||
filterChain.doFilter(request, response);
|
filterChain.doFilter(request, response);
|
||||||
} else {
|
} else {
|
||||||
long waitForRefill = probe.getNanosToWaitForRefill() / 1_000_000_000;
|
long waitForRefill = probe.getNanosToWaitForRefill() / 1_000_000_000;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user