Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^3: Is your web application really secure? ("CSRF")

by betterworld (Curate)
on Apr 01, 2007 at 03:54 UTC ( #607672=note: print w/replies, xml ) Need Help??

in reply to Re^2: Is your web application really secure? ("CSRF")
in thread Is your web application really secure? ("CSRF")

if i had opened a website with a form in it, let the browser window open and try to send the form the next day i would consider it ok if i then get a message that the token is expired.
If I don't lose my lengthy texts in the form, that would be all right.

But consider you have 10 tabs open, and on the next morning, you re-login in one tab, and then go through the other 9 tabs one after another to click reload. This isn't exactly fun.

Maybe the best (yet complex) solution is this: One could try to fix the expired tokens via Java script (you can read cookies with Java script). If the server still gets expired tokens (which means that Java script was not available), it could check the referer (and that the method was POST, so that no <img> attacks are possible). If there is no referer, the server can still return an error.

This would make using the site more comfortable for those users who have either Java script or referers turned on, while the site is still usable for other users.

  • Comment on Re^3: Is your web application really secure? ("CSRF")

Replies are listed 'Best First'.
Re^4: Is your web application really secure? ("CSRF")
by tinita (Parson) on Apr 02, 2007 at 09:27 UTC
    it all depends on how secure you want the application. if you're doing online-banking i think even you are glad that usually you have a timeout of 10 minutes and you can't let windows open and expect them to work an hour later =)
      Quite right. Using the approach that I described above, you can set the expiration timeout to 10 minutes and nobody will be able to waste you money online while you're absent. But the point is, that when you come back, you only need to login in one browser tab, and all the other tabs work again. Regardless of the cookie expiration timeout.

      Nevertheless, if the computer is in a room where many people wander about, you should lock the screen or something like that.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://607672]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2017-02-25 16:10 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (365 votes). Check out past polls.