request context tracks session access

This commit is contained in:
David Lord 2026-02-18 19:02:54 -08:00
parent 27be933840
commit c17f379390
No known key found for this signature in database
GPG key ID: 43368A7AA8CC5926
6 changed files with 73 additions and 52 deletions

View file

@ -1318,8 +1318,8 @@ class Flask(App):
for func in reversed(self.after_request_funcs[name]):
response = self.ensure_sync(func)(response)
if not self.session_interface.is_null_session(ctx.session):
self.session_interface.save_session(self, ctx.session, response)
if not self.session_interface.is_null_session(ctx._session):
self.session_interface.save_session(self, ctx._session, response)
return response