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 666799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:51:31+00:00 2026-05-13T23:51:31+00:00

After reading this: http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#how-to-use-it I came to the conclusion that it is not valid

  • 0

After reading this: http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#how-to-use-it

I came to the conclusion that it is not valid to use this except for when you trust the person who is using the page which enlists it. Is this correct?

I guess I don’t really understand when it’s safe to use this because of this statement:

This should not be done for POST forms
that target external URLs, since that
would cause the CSRF token to be
leaked, leading to a vulnerability.

The reason it’s confusing is that; to me an “external URL” would be page on that isn’t part of my domain (ie, I own http://www.example.com and put a form that posts to http://www.spamfoo.com. This obviously can’t be the case since people wouldn’t use Django for generating forms that post to other people’s websites, but how could it be true that you can’t use CSRF protection on public forms (like a login form)?

  • 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-13T23:51:32+00:00Added an answer on May 13, 2026 at 11:51 pm

    With apologies to not understanding the specific source of your confusion, I’ll say that the question you should be asking is when NOT to use CSRF protection. You’ve already called out this case from the docs:

    This should not be done for POST forms
    that target external URLs, since that
    would cause the CSRF token to be
    leaked, leading to a vulnerability.

    If you are posting a form to your domain, you’ll want CSRF protection enabled by default, unless you have a specific reason to disable it (which should be more rare than not).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After reading this article http://lukast.mediablog.sk/log/?p=155 I decided to use mingw on linux to compile
After reading this article on thedailywtf.com, I'm not sure that I really got the
I was looking at using Amazon's EC2 service after reading this article: http://www.ibm.com/developerworks/java/library/j-javadev2-4/index.html But
LINQ include missing. after reading this post: http://romiller.com/2010/07/14/ef-ctp4-tips-tricks-include-with-lambda/ i would like to use include.
I was reading this: http://www.openfeint.com/ofdeveloper/index.php/kb/article/000089 , and it seemed to make out that the
After reading the comments on this site: http://www.webresourcesdepot.com/jwysiwyg-jquery-inline-content-editor-plugin/ There is a bit of consensus
After reading this article http://camendesign.com/code/developpeurs_sans_frontieres I have decided to follow what it says and
After reading this blog entry : http://wekeroad.com/post/4069048840/when-should-a-method-be-a-property , I'm wondering why Microsoft choose in
After reading this blog post: http://www.sitepoint.com/javascript-shared-web-workers-html5/ I don't get it. What's the difference between
I am reading this http://docs.python.org/dev/library/multiprocessing.html In particular this p = multiprocessing.Process(target=time.sleep, args=(1000,)) I tried

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.