Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by tinita (Parson)
on Apr 01, 2007 at 00:28 UTC ( #607661=note: print w/ replies, xml ) Need Help??


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

However I regret that this takes much of the coolness and simplicity out of the concept of session cookies because they get kind of useless for POST requests.
well, i think you're right, but IMHO a session cookie is most useful in GET requests, like viewing a forum thread or something else, so that you can bookmark it easily.
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.


Comment on Re^2: Is your web application really secure? ("CSRF")
Re^3: Is your web application really secure? ("CSRF")
by betterworld (Deacon) on Apr 01, 2007 at 03:54 UTC
    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.

      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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://607661]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2014-12-28 16:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (182 votes), past polls