diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000000..d05e25c106 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,5 @@ +# Security Policy + +## Reporting a Vulnerability + +Please report security vulnerabilities by going to our Security tab and selecting `Report a vulnerability` to submit a description of the issue. Our maintainers will triage the submission as soon as possible. diff --git a/src/main/java/io/openliberty/website/SecurityFilter.java b/src/main/java/io/openliberty/website/SecurityFilter.java index 936377809f..0a03ca5950 100644 --- a/src/main/java/io/openliberty/website/SecurityFilter.java +++ b/src/main/java/io/openliberty/website/SecurityFilter.java @@ -109,8 +109,10 @@ public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain req.getRequestDispatcher(uri.concat(".gz")).include(req, response); } catch(FileNotFoundException e) { - response.setStatus(HttpServletResponse.SC_NOT_FOUND); - response.sendRedirect("/404.html"); + response.reset(); + response.setHeader("Content-Type", "text/html"); + response.sendError(404); + return; } } } else if (uri.startsWith("/api/builds/") || uri.startsWith("/api/github/")) {