-
Notifications
You must be signed in to change notification settings - Fork 42
Potential Vulnerability in Cloned Code #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,6 +39,8 @@ public class XssFilter extends OncePerRequestFilter { | |
|
|
||
| private final PathMatcher pathMatcher; | ||
|
|
||
| private final XssCleaner xssCleaner; | ||
|
|
||
| @Override | ||
| protected boolean shouldNotFilter(HttpServletRequest request) { | ||
| if (!xssProperties.isEnable()) { | ||
|
|
@@ -58,9 +60,9 @@ protected boolean shouldNotFilter(HttpServletRequest request) { | |
| * @throws IOException | ||
| */ | ||
| @Override | ||
| protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) | ||
| protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain, XssCleaner xssCleaner) | ||
| throws ServletException, IOException { | ||
|
Comment on lines
62
to
64
|
||
| filterChain.doFilter(new XssRequestWrapper(request), response); | ||
| filterChain.doFilter(new XssRequestWrapper(request,xssCleaner), response); | ||
| } | ||
|
Comment on lines
+65
to
66
|
||
|
|
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
XssCleaneris referenced as a new dependency, but there is noXssCleanertype defined anywhere in this module/repo (searching underart-spring-boot-starter-xssonly finds this file). This will not compile unless you add/introduce theXssCleanertype (and ensure it is a Spring bean), or replace it with an existing cleaner implementation used by the project.