CSRF token missing or incorrect

98 views
Skip to first unread message

Jeff Cave

unread,
Apr 26, 2013, 10:58:29 AM4/26/13
to moz...@googlegroups.com
I am looking at giving MozTrap a trial run during a short but intense project we have coming up.

I currently have it installed, and being proxied through apache.

Problem:
I have created new users, and want to log in using their accounts. To get a password, I go through the "reset password" forms.

When I submit the "reset password" form,  I receive a "CSRF token missing or incorrect" error:


Unsure how to proceed, any help would be appreciated.


Cameron Dawson

unread,
Apr 29, 2013, 12:17:54 PM4/29/13
to moz...@googlegroups.com
Hi Jeff--  Which branch are you using?  The Persona login recently changed, which required a code-change in MozTrap.  So the 1.4.5.5 branch is where you should be.  Of course, if you don't want to use Persona log-in and just want the simple log in, then find this line in your ``local.py`` file and uncomment the second line:

# Uncomment this to use username/password logins instead of BrowserID/Persona.
#USE_BROWSERID = False

of if you DO want to use Persona, be sure you set the second of these lines to the right URL for your host in ``local.py``:

# This must be changed to the correct live deployment URL.
#SITE_URL = "http://localhost:8000"

If this doesn't help, let me know and we'll trouble-shoot further.
-Cam

Jeff Cave

unread,
Apr 30, 2013, 9:49:13 AM4/30/13
to moz...@googlegroups.com
I am using 1.4.5 (at least, not sure about 1.4.5.5).

I am using username/passwords for login.

After reading your comments, I went through my configuration with a comb. I ended up removing the CACHES config portion (which I had uncommented). That seems to have fixed it. In fact, I can reproduce the error by removing and putting it back. I'll just leave that config commented for now.

(Now I just have to figure out how to get an email past the secure smtp server)

Cathy Dai

unread,
Nov 8, 2013, 12:04:58 AM11/8/13
to moz...@googlegroups.com
Same issue here. Thanks Jeff for providing the workaround!
Reply all
Reply to author
Forward
0 new messages