Reputation: 1
While throwing Servlet exception in Filter class doFilter() method, Exception Id is getting printed which is causing "Unhandled Exception" Veracode vulnerability. Below is my code.
public void doFilter(ServletRequest request,ServletResponse response, FilterChain chain) throws IO Exception, ServletException{
//some code
if(//some condition){
chain.doFilter(request, response);
}else{
throw new ServletException("Attack detected!");
}
Servlet Exception is getting printed but it is printed along Exception Id which is causing veracode vulnerability.
Can you please help me solve this? Thanks in advance
Upvotes: 0
Views: 69