-
Fix stale render context on reused component instances. A
ViewComponent::Baseinstance memoized its controller, helpers, request, view context, lookup context, view flow, and requested format details on first render via||=. Rendering the same instance a second time (intentionally or via aliasing) reused that stale context, which could leak data across requests, sessions, or users.#render_innow resets these ivars on every call so each render derives its context from the current view.Joel Hawksley
-
Fix HTML-safety bypass in
around_render.ViewComponent::Base#around_rendercould return HTML-unsafe strings that bypassed the escaping applied to normal#callreturn values, creating an XSS risk. The vulnerability was amplified inViewComponent::Collection#render_in, which joined per-item results and unconditionally marked the outputhtml_safe. HTML-unsafe strings returned fromaround_renderare now escaped (with a warning) andCollection#render_innow usessafe_joinso unsafe per-item output is escaped instead of laundered into aSafeBuffer.
Joel Hawksley