Fixing Unvalidated Redirects and Forwards in JAVA

This post describes how to fix unvalidated redirects and forwards in java with code example.

Posted by on March 22, 2014 1 Comment

Note: This post is part of our series on “How to Fix Unvalidated Redirects and Forwards“. The series contains examples on how to fix unvalidated redirects and forwards in various programming languages.

The following code will allow you prevent unvalidated redirects and Fowards in JAVA

<%
	String redirectURL = "http://www.example.com/";
	response.sendRedirect(redirectURL);
	return;
%>

One thought on “Fixing Unvalidated Redirects and Forwards in JAVA

  1. Pingback: How to Fix Unvalidated Redirects and Forwards - Secure Coding Blog - Redirect Abuse

Leave a Reply

Your email address will not be published. Required fields are marked *