Repository navigation
Drop the inline <style> from the shipped logo (4.0.1) - #20
Merged
Merged
Conversation
login.html {% include %}s logo.svg, so its <style> block landed on every consumer's
sign-in page and ruled out a CSP without 'unsafe-inline' in style-src for all three.
The rule set stroke-width: 0 on groups that have no stroke, and nothing on the page
gives them one, so it was a no-op: rendered before and after, the logo differs by
zero pixels.
Also fixes <svg mlns=> to xmlns=, harmless inline but invalid on its own.
A test now renders the sign-in page and fails on any inline style or script, so this
is caught here rather than only by chi-platform's audit.
Fixes #19.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #19.
login.htmluses{% include %}to putlogo.svginline, so the SVG's<style>block ended up on the sign-in page of daedalus, email_service and monitor. One inline style there rules out aContent-Security-Policywithout'unsafe-inline'instyle-src, for all three apps.Changes
logo.svg: deleted<defs><style>.text, .graphic {stroke-width: 0;}</style></defs>. It did nothing: the logo has nostroke, and nothing on the page gives it one (login.cssis the page's only stylesheet). Also fixed<svg mlns=…>toxmlns=. The typo is harmless when inlined, but the file isn't valid on its own.test_login_page_has_no_inline_style_or_scriptrenders the sign-in page and fails on any<style>,style=,on*=, or<script>withoutsrc. The chi-platform audit catches the same thing, but only when someone runs it; this test runs on every change.__version__, the README install snippets, an "Upgrading from 4.0.0 to 4.0.1" note, and a "Templates" rule inCLAUDE.md.Verification
['<style'] != [], and passes after. The full suite passes: 110 tests.ruff checkandruff format --checkare clean.chi-platform/audit.sh user_manager: ✓ 18 checks.After merging
Tag
v4.0.1. Each app then needs its pin bumped to pick up the fix; until all three are bumped,package-pin-consistentwill flag the ones still behind.🤖 Generated with Claude Code