Skip to content

web: Bound the static version cache, update docs - #3787

Merged
bdarnell merged 2 commits into
tornadoweb:masterfrom
bdarnell:claude/confident-pascal-putsl0
Oct 10, 2026
Merged

bdarnell merged 2 commits into
tornadoweb:masterfrom
bdarnell:claude/confident-pascal-putsl0

Conversation

@bdarnell

Copy link
Copy Markdown
Member

Document that static_url is for known values and should not be derived from untrusted input. Update release notes.

StaticFileHandler._static_hashes gained an entry for every distinct
path passed to static_url, including paths to files that don't exist,
and never evicted anything. Limit it to MAX_CACHED_VERSIONS (10000 by
default) entries, discarding the least recently used.

Also document that static_url and get_version are meant for an
application's known static files and should not be called with
untrusted input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jhn71YM65mTQ8sdDrEMwS8
@bdarnell
bdarnell merged commit 9f94e12 into tornadoweb:master Oct 10, 2026
17 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