The documentation has an explanation here , but I had additional questions ..
Why is a dedicated CSRF cookie necessary?
If Django does not use invalid transactions, why not just require you to embed the session identifier inside the body of the POST request?
Why is CSRF nonce bound to a session id? Does it do Django?
This webpage seems to imply that the CSRF nonce should be bound to the session identifier (e.g. CSRF nonce = keyed hash of the session identifier). Why is this? Django bind its CSRF nonce with session id?
Why does Django use session-independent, non-transactional notes?
Is it due to a performance problem? Intuitively defined non-transactional transactions seem to be more secure in nature.
source share