Here is the story:
- Just after login, page A is rendered with the anti-CSRF hidden field.
- Page A contains a link to page B. Normally this would be an ordinary anchor, but to prevent CSRF, the link submits a form with action to page B, which puts the anti-CSRF hidden field in a POST (thus preventing revealing this value at URL).
- Server validates session and renders page B, again with anti-CSRF hidden field.
- Page B contains a link to page C, which also uses submit and is also validated by the server.
- At page C, user presses the back button to go back to B.
Because B is the result of a submit, browser asks for re-submission. Terrible!
I know that I shouldn't return body from POST, however how can I safely send the anti-CSRF field without using POST to go from a page to another? And if I use a nonces, the back-button will yield a valid page...
Does it have a solution? Or am I really required to change my entire site to use partial page updates?