Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

by Joost (Canon)
on Mar 27, 2007 at 19:02 UTC ( [id://606838]=note: print w/replies, xml ) Need Help??


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

I've thought for a while now that browsers probably shouldn't allow POST requests for another domain (especially scripted ones). Unfortunately that would break lots and lots of web applications so the chances of it being implemented are somewhere around zero.

One thing that might help a bit is to set up your webserver to prohibit POSTs that don't have a referer header from your trusted site(s). I'm pretty sure there's a way to do that in apache.

As far as I know you a malicious site can't fake a referer header* (unless maybe if you allow cross-site XMLHTTP - but all modern browsers prohibit that - right?)

Good suggestion on the tokens, by the way.

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

Replies are listed 'Best First'.
Re^2: Is your web application really secure? ("CSRF")
by betterworld (Curate) on Mar 27, 2007 at 19:31 UTC
    I've thought for a while now that browsers probably shouldn't allow POST requests for another domain (especially scripted ones). Unfortunately that would break lots and lots of web applications
    A good start would be to warn the user that the form is sent to an external site, and not to send cookies.
Re^2: Is your web application really secure? ("CSRF")
by MidLifeXis (Monsignor) on Mar 29, 2007 at 17:26 UTC

    As far as I know you a malicious site can't fake a referer header* (unless maybe if you allow cross-site XMLHTTP - but all modern browsers prohibit that - right?)

    Never trust the browser

    --MidLifeXis

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-19 15:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found