In my JSP webpad, I want to verify that a user is coming from a specific page, then Compare what are some other techniques to verify that this verification can be easily deceived, that a client is coming from the expected URL? I think it has come before the SO. Earlier, JSP preprocessing servlets generate a unique token. Thanks PR Store it in session Give it hidden input value of the form Or as the request parameter of the link when you are using the link instead of the form Compare the preprocessing servlet of another JSP to one of the sessions This was the original concept that considers a page-to-page conversation. You want to use multiple browser pages / tabs that you can use to Http: //myapplication.com/foo.jsp . To check on the page, I could:
string ref = request.getHeader ("Referrer");
ref to
http://myapplication.com/foo.jsp
String token = UUID.randomUUID (). ToString ();
session.setAttribute ("token", token);
& lt; Input type = "hidden" name = "token" value = "$ {token}" />
string token = (string) session.getAttribute ("token" ); Session.removeAttribute ("token"); If (token! = Null & token.quals (request.getParameter ("token")) {// valid, it is necessary to continue} Else {// invalid, block request}
set & lt; String & gt; or
Maps & lt; String, set & lt; String & gt; & Gt; Instead of tokens (as keys and tokens value as URIs), instead of .
Comments
Post a Comment