Hi,

The cookie test in django.contrib.auth.views.login() view doesn't seem
to work as expected. I disabled cookies in my browser for the
following test.

1. The view is called via a GET request and displays the login
template/form. The test cookie is set.
2. The form is posted back to the view. The view is supposed to check
for the test cookie and throw an error if cookie is not found. This
check doesn't happen.

The documentation of the init method of AuthenticationForm says it
will validate that cookies are enabled only if a request is passed in
when instantiating the form. But on POST the login view doesn't pass
the request.

I copied the code from the login view and modified it to pass the
request and the cookie test works.

Is it a defect in the login view or am I doing something wrong?

I am using Django 1.0.2 Final.

Thanks,
Akbar

--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to