mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 04:40:39 -07:00
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
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Drop } from '../drop/drop'
|
||||
|
||||
interface ScopeObject extends Record<string, any> {
|
||||
interface ScopeObject extends Record<string | number | symbol, any> {
|
||||
toLiquid?: () => any;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user