From 2fd1483e16879cb672a0e4c6e9c5515d9f5efca5 Mon Sep 17 00:00:00 2001 From: Jeremy Daer Date: Sat, 8 Aug 2026 18:35:26 -0700 Subject: [PATCH] Harden custom-styles route: browser XSS proof and higher-resolution cache key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a headless-browser system test that stores a ) + + setup do + accounts(:signal).update!(custom_styles: PAYLOAD) + sign_in "jz@37signals.com" + end + + test "custom styles payload loads as a stylesheet and never executes" do + # (a) custom styles arrive via an external stylesheet link, not inline markup + assert_selector "link[rel='stylesheet'][href*='custom_styles']", visible: false + + # (b) the payload's