February 2019
Intermediate to advanced
134 pages
3h 36m
English
If XSS is a case of a browser trusting JavaScript from the server too much, XSRF is a case of a server trusting a browser too much.
Let’s go back to our example of a blogging site. Somehow there must be a browser request that saves a blog post to the server. Suppose the blog posting request looks something like this:
| | POST /blog/create HTTP/1.1 |
| | Host: www.romansjournalingsite.com |
| | Accept-Encoding: gzip, deflate |
| | Accept: */* |
| | Cookie: sessionid=Re9ljf4uObKk9mSFqBlusxamUKw |
| | Connection: keep-alive |
| | Content-Type: application/x-www-form-urlencoded; charset=utf-8 |
| | Content-Length: 57 |
| | |
| | body=It+was+the+best+of+posts.+It+was+the+worst+of+posts.&submit=Publish |
In a naive web application, that could be all it takes to publish ...
Read now
Unlock full access