[Django] #36561: `aupdate_session_auth_hash` is using `request.user`

1 view
Skip to first unread message

Django

unread,
Aug 19, 2025, 5:09:47 AM8/19/25
to django-...@googlegroups.com
#36561: `aupdate_session_auth_hash` is using `request.user`
------------------------+----------------------------------------
Reporter: Xdynix | Type: Bug
Status: new | Component: contrib.auth
Version: 5.2 | Severity: Normal
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------+----------------------------------------
In **aupdate_session_auth_hash** the source code is

{{{#!python
if hasattr(user, "get_session_auth_hash") and request.user == user:
}}}

which will raise **SynchronousOnlyOperation** error when used in an async
view. It should be `await request.auser()` instead.
--
Ticket URL: <https://code.djangoproject.com/ticket/36561>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 19, 2025, 5:10:21 AM8/19/25
to django-...@googlegroups.com
#36561: `aupdate_session_auth_hash` is using `request.user`
------------------------------+--------------------------------------
Reporter: Xdynix | Owner: Xdynix
Type: Bug | Status: assigned
Component: contrib.auth | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
------------------------------+--------------------------------------
Changes (by Xdynix):

* easy: 0 => 1
* owner: (none) => Xdynix
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/36561#comment:1>
Reply all
Reply to author
Forward
0 new messages