The Wire · Showcase
PHOENIX LONGPOLL SECURITY HARDENING AND LIVEVIEW COMPONENT DELETION FIX
By RepoJournal · Filed · About Elixir & Phoenix
Phoenix shipped two critical transport fixes overnight: LongPoll can now send tokens via headers instead of query parameters, and LiveView components marked for deletion now force a full render to prevent orphaned DOM.
The LongPoll transport upgrade [1] closes a security exposure by allowing tokens to travel in request headers instead of query strings, with backward compatibility for older clients still sending via params. Simultaneously, a batch timeout bug [2] that left LongPoll stuck in an unrecoverable state has been fixed, closing and retrying the transport on POST timeout instead of silently deadlocking the send queue. On the LiveView side, the component deletion render fix [3] addresses a critical bug where deleted components could be resurrected on re-renders by forcing a full render pass when a component is marked for removal. The Phoenix origin policy cache [4] now correctly includes per-mount check_origin options in the cache key, preventing the first mount to be reached from deciding policy for all subsequent mounts of the same socket module. Elixir core fixed spec collection for type variables [5], ensuring that nested type vars in annotated arguments are properly captured and displayed in h/1 documentation. Ecto's autogenerate options for composite types [6] are now correctly applied.
One email a day. Unsubscribe in one click.
Keep up with Elixir & Phoenix in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Review LongPoll token configuration and migrate to header-based transport where possible phoenixframework/phoenix [plan]
- → Test LiveView component deletion behavior in production-like conditions after deploying phoenixframework/phoenix_live_view [plan]
- → Audit multi-mount socket configurations with different check_origin options phoenixframework/phoenix [monitor]
References
- [1] Allow configuring LongPoll to send its token via headers ↗ phoenixframework/phoenix
- [2] Close and retry the longpoll transport when a batch POST times out ↗ phoenixframework/phoenix
- [3] Force a full render for components marked for deletion ↗ phoenixframework/phoenix_live_view
- [4] Include per-mount :check_origin in the origin policy cache key (#6774) phoenixframework/phoenix
- [5] Fix Code.Typespec.spec_to_quoted/2 incomplete variable type collection ↗ elixir-lang/elixir
- [6] Fix autogenerate options for composite types (#4773) elixir-ecto/ecto