How to avoid SSRF error on request.getRequestURI()

177 Views Asked by At

I have the following code

String decodedUri = URLDecoder.decode(request.getRequestURI(),
StandardCharsets.UTF_8.toString());

I also have a regex which validates the url

decodedUri.matches("^\\/[/.a-zA-Z0-9-?&=]+$")

Still checkmarx shows SSRF error

How to avoid this

0

There are 0 best solutions below