#37079: RemoteUserMiddleware assumes all ASGI requests will be handled by its sync
path
----------------------------------------+-----------------------------
Reporter: Jacob Walls | Owner: Jacob Walls
Type: Bug | Status: assigned
Component: contrib.auth | Version: 5.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
----------------------------------------+-----------------------------
As pointed out in a
[
https://github.com/django/django/pull/21079#discussion_r3070329801
review], `RemoteUserMiddleware` doesn't account for the case where an ASGI
request passes through (sync) `process_request()` due to subsequent sync-
only middleware in the stack. This could cause the wrong header to be
looked up.
Bug in 50f89ae850f6b4e35819fe725a08c7e579bfd099.
--
Ticket URL: <
https://code.djangoproject.com/ticket/37079>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.