Ask Your Question
0

fail to create an account on development server

asked 2011-07-29 02:55:31 -0500

kabexnuf gravatar image

updated 2011-07-29 07:59:37 -0500

I am following this to start a new forum. But I can not create a new account. When I press 'Create Account' it says

Forbidden (403) CSRF verification failed. Request aborted.

Reason given for failure:CSRF cookie not set.

I found this entry but suggested lines were already in my settings.py. What am I missing?

PS: The error page also comes when I try to click google or yahoo to log in.

edit retag flag offensive close merge delete

Comments

Hello, did you use "startforum" to set up your settings.py file? Or you made one by hand?
Evgeny gravatar imageEvgeny ( 2011-07-29 07:52:47 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2011-07-29 07:59:07 -0500

Evgeny gravatar image

If you have set up CSRF_COOKIE_DOMAIN as in this answer and the domain name matches your site's domain, and the csrf middleware is installed, then everything should work. Please double-check the details in that answer carefully.

In the case you have everything set up correctly, but the login still does not work, please email me zipped version of your project (evgeny.fadeev@gmail.com) or a link where I can download the file, if possible with information about version of Django you are using. Then I will test it out.

Thanks.

edit flag offensive delete link more

Comments

Thanks, i did not know that domain names should match. I wrote just something else in settings.py. I changed it to localhost and problem solved.
kabexnuf gravatar imagekabexnuf ( 2011-07-29 08:07:31 -0500 )edit
Very good, the purpose of CSRF - cross site request forgery protection is to prevent someone from posting anything to your account from another fake site, while you are logged in to a real site. Not a huge deal for a forum, but csrf protection is a standard security measure.
Evgeny gravatar imageEvgeny ( 2011-07-29 08:18:04 -0500 )edit

I had this problem too, because http://askbot.org/doc/initialize-database-tables.html says to run: python manage.py runserver hostname -i:8000 but the IP address doesn't match the CSRF setting domain in settings.py

Joseph gravatar imageJoseph ( 2011-11-15 17:09:10 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-07-29 02:55:31 -0500

Seen: 101 times

Last updated: Jul 29 '11