#32578: Handle request.get_host() raising DisallowedHost in CsrfViewMiddleware._origin_verified() -------------------------------------+------------------------------------- Reporter: Chris Jerdonek | Owner: nobody Type: Bug | Status: new Component: CSRF | Version: dev Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted CsrfViewMiddleware,DisallowedHost | Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 1 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by Chris Jerdonek): Thanks, Mariusz. However, do you know for sure that's testing the right code path? `_origin_verified()` only gets called when `if request.method not in ('GET', 'HEAD', 'OPTIONS', 'TRACE')`, but the test appears to be `GET`. I could be wrong though since my observation is based on inspection rather than running the test. -- Ticket URL: <https://code.djangoproject.com/ticket/32578#comment:4> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.f993e6198c2f21c8c0f5bf0e86fc58b0%40djangoproject.com.