Commit Graph
12 Commits
Author SHA1 Message Date
Yang Jun 33e455282d refactor: encapsulate Drop passthrough in createScope 2026-07-23 22:37:21 +08:00
Yang JunandCursor 12fa904ebd fix: address scope-security review findings
Restore null-prototype hardening for Jekyll include bindings, colocate blocked-key checks with readJSProperty, align ownPropertyOnly JSDoc with security docs, and drop integration tests duplicated in context.spec.

Co-authored-by: Cursor <[email protected]>
2026-07-21 20:38:46 +08:00
Yang JunandCursor bc207a66b7 refactor: drop redundant tag write-path blocking
Write blocking on assign/capture/increment/decrement duplicated read-side
protection in readJSProperty; null-proto scopes from push already prevent
prototype pollution on managed writes.

Co-authored-by: Cursor <[email protected]>
2026-07-21 20:31:38 +08:00
Yang Jun 90ab891c29 refactor: wrap plain scopes in Context.push()
Centralize null-prototype scope creation in push() so callers pass plain objects; Drop instances and existing null-proto frames are pushed as-is. Remove sanitizeScope in favor of createScope via Object.assign.
2026-07-19 23:42:09 +08:00
Yang JunandCursor 072f63c2c0 fix: tie proto key blocking to ownPropertyOnly policy
Block __proto__, constructor, and prototype only when ownPropertyOnly
is true or when access would traverse the prototype chain. Allow own
properties with those names when ownPropertyOnly is false.

Co-authored-by: Cursor <[email protected]>
2026-07-19 13:54:43 +08:00
Yang JunandCursor 6bdf65a6a1 feat: block dangerous scope keys and harden findScope (#898)
Co-authored-by: Cursor <[email protected]>
2026-07-15 23:02:06 +08:00
47d3f1b1cf feat(context): null-prototype scope frames via createScope (#899)
- Add createScope() building Object.create(null) with optional own props

- Initialize context stack bottom with createScope() for assign/capture

- Push null-proto scopes from for, tablerow, block, layout, include (incl. Jekyll)

Co-authored-by: Cursor <[email protected]>
2026-05-16 02:20:03 +08:00
Yang JunandGitHub e743da0020 fix: sort and sort_natural filters bypass ownPropertyOnly (#869)
Use _getFromScope for property access in sort/sort_natural filters to respect the ownPropertyOnly security option, preventing prototype chain traversal that could leak sensitive inherited properties.

Also extract shared sortBy helper, add orderedCompare with nil handling consistent with caseInsensitiveCompare and Ruby Liquid.

Made-with: Cursor
2026-04-07 21:01:20 +08:00
Jun Yang 92992689cd refactor: Tag class support in registerTag() 2022-11-27 14:04:01 +08:00
harttle 34d5af25a4 chore: trying to fix TS4053 2019-07-06 14:49:39 +08:00
harttle 88c89fe3b3 style: introduce @typescript-eslint/recommended 2019-07-06 14:33:34 +08:00
harttle 45e3c2bb8e refactor: switch Context <-> Scope concepts 2019-03-25 10:36:23 +08:00