Skip to content

Let the link check accept inline raster images - #14

Merged
Zacharon merged 1 commit into
mainfrom
fix/validator-inline-image-data-uris
Nov 3, 2026
Merged

Zacharon merged 1 commit into
mainfrom
fix/validator-inline-image-data-uris

Conversation

@Zacharon

@Zacharon Zacharon commented Nov 2, 2026

Copy link
Copy Markdown
Owner

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 other data: 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 is data and the rest matches a raster-only, base64-only pattern. A new test in tests/test_distribution.py checks 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 and check_public_boundary.py reports no findings. The Windows run on this PR is the real check.


Generated by Claude Code

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>
@Zacharon
Zacharon marked this pull request as ready for review November 3, 2026 09:01
@Zacharon
Zacharon merged commit bfdd479 into main Nov 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants