mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-06-23 07:55:07 +00:00
Hardening suggestions for Stirling-PDF / audit2 (#3758)
I've reviewed the recently opened PR ([3739 - Auditing support](https://github.com/Stirling-Tools/Stirling-PDF/pull/3739)) and have identified some area(s) that could benefit from additional hardening measures. These changes should help prevent potential security vulnerabilities and improve overall code quality. Thank you for your consideration! 🧚🤖 Powered by Pixeebot [Feedback](https://ask.pixee.ai/feedback) | [Community](https://pixee-community.slack.com/signup#/domain-signup) | [Docs](https://docs.pixee.ai/)  Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
This commit is contained in:
parent
911c894023
commit
fe4cb9058c
@ -1,5 +1,6 @@
|
|||||||
package stirling.software.proprietary.web;
|
package stirling.software.proprietary.web;
|
||||||
|
|
||||||
|
import io.github.pixee.security.Newlines;
|
||||||
import jakarta.servlet.FilterChain;
|
import jakarta.servlet.FilterChain;
|
||||||
import jakarta.servlet.ServletException;
|
import jakarta.servlet.ServletException;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
@ -36,7 +37,7 @@ public class CorrelationIdFilter extends OncePerRequestFilter {
|
|||||||
}
|
}
|
||||||
req.setAttribute(MDC_KEY, id);
|
req.setAttribute(MDC_KEY, id);
|
||||||
MDC.put(MDC_KEY, id);
|
MDC.put(MDC_KEY, id);
|
||||||
res.setHeader(HEADER, id);
|
res.setHeader(HEADER, Newlines.stripAll(id));
|
||||||
|
|
||||||
chain.doFilter(req, res);
|
chain.doFilter(req, res);
|
||||||
} finally {
|
} finally {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user