v1.0.0rc15
Pre-release
Pre-release
·
1245 commits
to main
since this release
Fixed
@permission_requiredevent handlers no longer raiseSynchronousOnlyOperation(#1648). Sibling of #1638: the per-event handler-permission check (_validate_event_security) calledcheck_handler_permissionsynchronously from anasync def. For a handler decorated with@permission_required, that callsuser.has_perms(), which under Django's defaultModelBackendqueries the DB for a non-superuser — raisingSynchronousOnlyOperationin the event loop (and, unlike the object-permission path, with no fail-closed catch, so it propagated). The call is now wrapped insync_to_async, mirroring #1638 and the mount path.live_redirectto a different view now mounts the correct target (#1647). The client'sresolveViewPath()falls back to the current container'sdj-view— the source view — whenwindow.djust._routeMapis empty, which is the default for apps using plain Djangopath()URLconfs (nolive_session()). The server trusted that client-supplied class in thelive_redirect_mountframe, instantiated the source view against the destination URL's request, and raised "Failed to load view. Please refresh the page."handle_live_redirect_mountnow resolves the destination view server-side from the URL via Django's URL dispatcher and overrides the client-suppliedviewwhen the URL maps to a djustLiveView(falling back to the client value otherwise, solive_session()route maps are unaffected).live_session()is no longer a hidden prerequisite forlive_redirectacross plainpath()URLconfs.
What's Changed
- fix(websocket): resolve live_redirect target view from URL, not client (#1647) by @johnrtipton in #1656
- fix(auth): wrap per-event check_handler_permission in sync_to_async (#1648) by @johnrtipton in #1657
- test(infra): empirical-canary for assert_http_ws_djid_parity (#1654) by @johnrtipton in #1658
- test/refactor: strengthen drain guards — predicate, caller-count, deploy test (#1655) by @johnrtipton in #1659
Full Changelog: v1.0.0rc14...v1.0.0rc15