Cookie blocking leads to cryptic errors
|Reported by:||spaetz||Owned by:|
Trying to log in, I received a "403 Forbidden" page with no further information, the GMG log included a "ERROR [mediagoblin.meddleware.csrf] CSRF cookie not present" statement.
It took a while until I realized it was my cookie blocker that caused this. Can we capture this specific case somehow and test whether cookie setting is disabled? I know that django tries to set test cookies at some points in time. Perhaps this should be tested in the CSRF meddleware in case of CSRF failure?
In any case, we should hand back a nicer error message than 403 forbidden when the user has cookies disabled :-).