Wednesday, September 7, 2011

django comments: CSRF failure (randomly)

Hi,

this issue is driving me mad, I'm using Django 1.2 with the 'django.contrib.comments' applications, randomly I get 

'CSRF token missing or incorrect'

 'request_csrf_token': u'c22473c9626677f09a64c751df4bfa8a',
 'META': {'HTTP_COOKIE': 'csrftoken=c04574f981417a4667db264bb527239d;

there is a mismatch.

It's almost impossible to reproduce, but I' managed to activate logging with a custom view and sometimes I receive the failure notice with the details, they come from real users messages, not spammers.

Disabling the cache middleware doesn't seems to change anything.

Any hint about what I can further check ?

This is the order of my middlewares:


Deployment is with apache/mod_wsgi:

WSGIDaemonProcess mysite.com user=www-data group=www-data processes=10 threads=1 display-name=WSGI


--
Alessandro Pasotti
w3:   www.itopen.it

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment