3 ms·
Usually this is done by sending an nonce that must be sent back with the request to delete the account. The attacking site won't have the nonce, so it cannot de
by iwalton3 7y ago
Usually this is done by sending an nonce that must be sent back with the request to delete the account. The attacking site won't have the nonce, so it cannot delete the account.
Currently, you can also get a similar protection by requiring headers such as "Content-Type: application/json", since other sites will not be able to make that request.
Referer does work in some cases, but it is fairly common for users to disable the Referer, so relying on it for site functionality is not ideal.
- t0astbread 7y agoHow's the resource containing the nonce any more secure than just a plain "delete-account" endpoint? Thinking about it, you could probably use CORS and some methods like X-Frame-Options to protect your nonce. But then you could just use that on the whole deletion page and avoid the nonce, I guess?
- vortico 7y agoThe nonce would only be available if you scrape the page while logged in and extract the logout URL, which is impossible with iframes.
- t0astbread 7y agoCould you not still scrape the HTTP response for the page containing the nonce?
- vortico 7y agoNot with a browser, no.