The Wire · Showcase
PHOENIX LIVE VIEW SEALS CRITICAL NODE NAME LEAK IN UPLOAD TOKENS
By RepoJournal · Filed · About Elixir & Phoenix
A reverted encryption fix exposes how Phoenix was leaking BEAM node identities through unencrypted upload tokens, and the core team is pivoting to a cleaner solution using term_to_binary.
Phoenix Live View shipped an encryption layer for upload tokens after discovering that `allow_upload/3` was signing but not encrypting payloads [1]. The tokens embedded PIDs whose binary representation includes the source node name literally, making them trivially decodable by any client and exposing internal hostnames and pod IPs in container environments [2]. The fix landed, then José Valim reverted it hours later [3], pivoting to a simpler approach: encoding tokens with `term_to_binary(data, [:local])` instead, which will ship through Plug.Crypto support. This is a security fix that matters for anyone running Phoenix apps in Kubernetes or behind load balancers where node names leak infrastructure topology. In parallel, the Live View team added programmatic access to debug and error events normally hidden in console logs via a new `phx:live-view:diagnostic` event, with debug output gated behind `LiveSocket.enableDebug()` on localhost [4]. The team also patched a silent disconnect bug where reconnection logic failed to re-register socket-close callbacks after clean closes, leaving pages in a phantom disconnected state until manual refresh [5]. On the Elixir side, Alexander Gubarev landed five type and documentation fixes across the compiler, ExUnit, and Calendar modules [7][8][9][10]. Ecto fixed preloader validation for multiple association combinations that previously triggered cryptic DB errors or misassociated data [6].
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
- → Watch for the Plug.Crypto upload token fix in the next Phoenix Live View release before deploying phoenixframework/phoenix_live_view [plan]
- → Test Live View reconnection behavior in your app, especially clean closes and network resets phoenixframework/phoenix_live_view [monitor]
- → Review preloader queries in Ecto if you use multiple association combinations elixir-ecto/ecto [monitor]
References
- [1] Encrypt LiveView upload tokens (#4337) phoenixframework/phoenix_live_view
- [2] Encrypt LiveView upload tokens ↗ phoenixframework/phoenix_live_view
- [3] Revert "Encrypt LiveView upload tokens (#4337)" phoenixframework/phoenix_live_view
- [4] Add a phx:live-view:diagnostic event ↗ phoenixframework/phoenix_live_view
- [5] Ls fix handler lost ↗ phoenixframework/phoenix_live_view
- [6] Fix preloader validation for multiple combinations ↗ elixir-ecto/ecto
- [7] Fix Kernel.ParallelCompiler.compile_opts() type each_cycle spec (#15664) elixir-lang/elixir
- [8] Fix Calendar.strftime negative year as 2-digits formatting (#15658) elixir-lang/elixir
- [9] Fix ExUnit.RunnerStats.increment_failure_counter/2 spec (#15659) elixir-lang/elixir
- [10] Fix pages code examples ↗ elixir-lang/elixir