I am dealing with the log forging issue for the code :
log.error("Request: " + req.getRequestURL() + " raised " + exception);
This element’s value (req.getRequestURL()) flows through the code without being properly sanitized or validated, and is eventually used in writing an audit log in handleError
I tried to remove the \n\r characters but with no success.
I have gone through different sites searching for the same but did not find the helpful content. Can anyone please explain the solution for this or a small guide to fix it.
Thanks