Skip to content

Validate encrypted tile payload bounds; add regression test and update docs#13

Open
AEliu wants to merge 1 commit intomasterfrom
codex/fix-spelling-error-and-inconsistencies
Open

Validate encrypted tile payload bounds; add regression test and update docs#13
AEliu wants to merge 1 commit intomasterfrom
codex/fix-spelling-error-and-inconsistencies

Conversation

@AEliu
Copy link
Copy Markdown
Owner

@AEliu AEliu commented Apr 21, 2026

Motivation

  • Prevent malformed encrypted tile payloads from being silently accepted or causing subtle errors during tile download by adding defensive validation.
  • Keep documentation aligned with the current package layout and fix a small wording typo.
  • Add a regression test to ensure encrypted tile validation remains enforced.

Description

  • Add bounds checks in decrypt_tile_if_needed to validate header metadata offsets and encrypted payload length and raise DownloadError on malformed data.
  • Add test_download_tiles_rejects_malformed_encrypted_payload in tests/test_tile_cache.py to cover malformed encrypted tile handling during tile download.
  • Update docs/project-status.md to reference src/artx/... instead of stale src/googleart_download/... and change compatibility-shell to compatibility-shim.

Testing

  • Ran uv run pytest -q tests/test_tile_cache.py tests/test_transport.py and received 32 passed.
  • Ran uv run ruff check src/artx/download/tiles.py tests/test_tile_cache.py docs/project-status.md and all checks passed.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant