views:

57

answers:

1

Hi, we are doing XSRF fixes for our code. we are using the session token to request token comparison method to achieve this. in case when session token is not equal to request token we will be redirecting to error page.

Problem:Once we are in Main Menu page, if the user "refresh" the page, it is throwing XSRF issue. Reason: As there wont be any request token(when we do a page refresh). since request token is NULL and it is not equal to session token it was throwing XSRF error.

The users of the application are not very happy with this approach. so is there any way to enable page refresh? or is it absolutely necessary/important to disable the page refresh(for security)?

Thanks in advance.

A: 

We use refresh in our page and I don't see any security issues. The request token is part of the URL. When the page is refreshed, the request token is still in the URL.

How are you sending the request token?

ZZ Coder
i am setting the request token as a hidden variable in the JSP. for the first time when the page loads since we dont have request token, we are having a token which will be TRUE. So the initial request goes through the filter. From then on application depends on request tokens. once the first page loads, that initial token will be made to FALSE. so now we dont have initial token or request token for the first page. so on refresh this fails.
micheal
Sounds like your design doesn't allow refresh. You need to send the initial token on every page request.
ZZ Coder