Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6253607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:01:53+00:00 2026-05-24T14:01:53+00:00

The documentation has an explanation here , but I had some additional questions.. Why

  • 0

The documentation has an explanation here, but I had some additional questions..

Why is a dedicated CSRF cookie necessary?

If Django does not use transaction specific nonces, why not just require to embed the session ID inside the POST request body?

Why should CSRF nonces be bind to session ID? Does Django do this?

This webpage seem to imply that CSRF nonce needs to be bound to the session ID (e.g. CSRF nonce = keyed hash of session ID). Why is that? Does Django bind its CSRF nonce to session ID?

Why does Django use session independent nonce and not transaction specific nonces?

Is it because of performance concern? Intuitively transaction specific nonces seem to be more secure by nature.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T14:01:53+00:00Added an answer on May 24, 2026 at 2:01 pm

    CSRF protection and session have different nature, so putting those in single cookie would make it harder to maintain.

    Here are some differences:

    1. You can use CSRF protection without using sessions.
    2. You may want to use CSRF before session started (ie. you don’t want to start session before user logged in, because of performance, but you want to protect your contact form with CSRF).
    3. Sometimes you want to delete session cookie, but probably never CSRF.
    4. CSRF protection is needed for single browser session (until you close browser), but sessions may continue for even weeks.
    5. You may want to have cross-domain session, but probably never need cross-domain CSRF.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

An often overlooked function that requires no external library, but basically has no documentation
Wolfram Research has had the same documentation for this function for the last 8
One again Microsoft poor documentation has left me confused. I am trying to use
I see the Nginx HttpRewriteModule documentation has an example to rewrite a www-prefixed domain
For example, NSString documentation has – initWithFormat: – initWithFormat:arguments: – initWithFormat:locale: – initWithFormat:locale:arguments: –
Has anyone found any documentation or research about what data is transfered to Google
NDoc has an XML element inheritdoc which allows you to inherit documentation of a
Enterprise Architect has a way to generate the documentation in HTML/RTF/etc. that you could
Has anybody got this to actually work? Documentation is non existent on how to
Has anyone seen any how-to, documentation, or otherwise about how to load HTTP Modules

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.