Repository navigation
Let the link check accept inline raster images - #14
Merged
Merged
Conversation
The Floorplan page added in d94f23b is a standalone HTML file whose favicon and logo are base64 PNG data: URIs. The link/privacy scan treated any non-http(s) scheme as unsafe, so test_public_safe_links_and_payload failed and Windows package validation went red on main. Accept data: URIs only for base64 PNG, JPEG, GIF and WebP images. SVG, HTML and every other data: type are still rejected, and a regression test pins both sides. 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.
Before: Windows package validation fails on main (and on the Floorplan PR) because the link/privacy scan rejects the standalone Floorplan page's inline PNG favicon and logo as "Unsafe public link in site\floorplan.html".
After: base64 PNG, JPEG, GIF and WebP
data:images pass the scan; SVG, HTML and every otherdata:type are still rejected, so the public boundary stays as strict for anything that can carry script or markup.How:
validate_links_and_privacy()skips a link only when its scheme isdataand the rest matches a raster-only, base64-only pattern. A new test intests/test_distribution.pychecks that PNG/WebP pass and SVG, HTML, non-base64 and attribute-breaking values fail. Locally (Linux, Python 3.13) the scan reproduced the CI error before the change, and after it all 36 tests pass andcheck_public_boundary.pyreports no findings. The Windows run on this PR is the real check.Generated by Claude Code