CSRF protection in django.contrib.flatpages.views.flatpage causes unwanted behavior
|Reported by:||Patryk Zawadzki||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
If you only decorate selected views with
csrf_protect, any non-protected POST that ends up resulting in a 404 response returns 403 Forbidden instead.
This is both unwanted and potentially puzzling to developers. Either the
flatpage view should not be decorated (it seems incapable of altering the application's state) or the above should be documented both in the CSRF section and in the flatpages section.