Repository navigation
fix(runtime): own-key i18n lookups, form member reads, cookie reading - #755
Merged
Merged
Conversation
The browser i18n runtime reads format profiles, parsers, message entries, the NUMBER profile and bundle directions as own keys only, so a name such as `constructor` fails like any unknown name (#701). Citry's runtime reads form members such as `isConnected`, `contains` and `dispatchEvent` past a control with the same name, on component roots, host elements and the focused element, and the development checks read node members from the prototype (#703). Both CSRF cookie readers skip a cookie whose value has a broken `%` escape and use the next cookie with the same name. Fixes #701 Fixes #703 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KUhrHXH1mNfRCnPcsQt7ED
The development checks read node members from the prototype chain so a form field cannot stand in for them. Searching the chain on every read made large comparisons about seven times slower. The checks now keep each prototype's answer per member, read each element's tag once per pairing instead of once per pair, and read a node's type once per node when grouping text. A large comparison is again within about a third of its earlier time, and the form protection is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KUhrHXH1mNfRCnPcsQt7ED
Keeps both PRs' browser runtime changes: own-key reads (ownValue) from this branch and key-order-insensitive config comparison (sameJsonContent) from #756. Generated runtime files rebuilt. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KUhrHXH1mNfRCnPcsQt7ED
JuroOravec
added a commit
that referenced
this pull request
Nov 18, 2026
) * docs(security): add review records for #754, #755, #756, #757 and #759 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KUhrHXH1mNfRCnPcsQt7ED * docs(security): apply review findings to the 1.0.2 hardening records Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KUhrHXH1mNfRCnPcsQt7ED --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
What changes
Three fixes in Citry's browser runtime. This is the first of two pull requests; the second, #756, covers
applyActionsredirects,csrfHeadersand the i18n configuration compare (#660).NUMBERprofile, bundle directions and the artifact merge check through a newownValuehelper. A name such asconstructoror__proto__now fails with the same error code as any other unknown name (I18N_FORMAT_INVALID,I18N_PARSE_INVALID,I18N_MESSAGE_MISSING,I18N_NUMBER_INVALID,I18N_ARTIFACT_INVALID). TheeditableValuePropsprops copy inclient.jsleaves out a__proto__key.namematches a form member hides that member. Citry's runtime now readsisConnected,contains,querySelectorAll,dispatchEvent,addEventListener,removeEventListener,checkVisibility,getClientRectsandfocuson a component root, host element or focused element throughreadBuiltIn,callBuiltInandnodeConnected. The development checks (dev_checks.js) read node members through a prototype helper,memberOf.docs/design/trust_boundaries.mdrows for message ids, profile names,id=/name=and form members are updated, and the two open-question rows for #701 and #703 are removed.runtime.js,events.js,dev_checks.min.jsand the i18n plugin are rebuilt withnode build.mjs.Updated tests that encoded the old behavior: the
.outsidefallback test incitry-listeners.test.mjsnow removescheckVisibilityfrom the stand-in's prototype (the runtime reads built-in members from the prototype), andpage-dom.test.mjsextracts the newreadBuiltInhelper.Checks
pnpm --dir packages/js/citry-client run check(vue types, tsc, biome,node --test): 370 passed, 0 failed.i18n-own-keys.test.mjs(7),client-helpers.test.mjs(3), one cookie test invue-events.test.mjs, one form test indev-checks.test.mjs. Each fails against themainsources.test_vue_named_elements_e2e.py: a form root with fields nameddispatchEvent,contains,isConnected,querySelectorAll,removeEventListener, re-rendered by a serverRender, plusCitry.events.send(element). It fails with themainruntime (root.contains is not a function).test_vue_dev_checks.py,test_vue_prepared.py,test_hashed_runtime.py,test_vue_runtime_coverage_secondary.py): 101 passed.ruff checkandruff format --checkon the changed test file: clean.Review
An independent reviewer did a security pass (addresses and keys from the server, element
idandname, translated messages), checked the advisory survey kinds (prototype keys, DOM clobbering, CSRF token leaks, crashes on bad input) and did a prose pass. It found no hole. Its findings are applied: more dev-check reads and focus restore go through the helpers, the__proto__prop is dropped from the copy rather than kept as a key, a dev-checks test was added, and the trust row wording was narrowed.Left out: Vue's own code still reads form members directly, so a control named
addEventListenerstops the Vue app that renders the form.docs/security.md("Check form field names") already says so. TheartifactsAgreeown-key lookup has no test of its own.Versioning
Bug fixes only. Nothing the 1.x promise covers changes. Needs a patch release (1.0.2).
Fixes #701
Fixes #703
🤖 Generated with Claude Code
https://claude.ai/code/session_01KUhrHXH1mNfRCnPcsQt7ED