We use fortify to scan the Java source code and complain about the error below:
Method abc() sends unvalidated data to a web browser on line 200, which can result in the browser executing malicious code.
We have below code in line 200:
<a href="<%= Util.getProduct(request) %>">Product</a>
And Util.java hsa below code in getProduct method:
String prod = request.getParameter("prod");
Can someone tell me how to fix this XSS vulnerability?
Thanks!
source share