You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ACL is skipped for accessing any properties of an object destructured into function arguments
Root Cause
Destructured object property access in function arguments are not checked for ACL
Reproducible Code
functionf({caches: c}){returnc;}f(window);/* variants function expression async function generator function arrow function async arrow function class constructor class static method class method object shorthand method etc.*/
Fix
Check "*"(S_ALL) property access of each function argument object if it is destructured into object properties or array elements
Examples
// original (function declaration)functionf({caches: c}){returnc;}// hookedfunctionf({caches: c}){for(letargofarguments)__hook__('#*',arg,[],_c_[0]);return__hook__(({caches: c})=>{returnc;},null,arguments,_c_[0]);}// original (arrow function)({caches: c})=>c;// hooked(...args)=>__hook__(({caches: c})=>c,null,args.map(arg=>__hook__('#*',arg,[],_c_[0])),_c_[0]);
Notes
The ACL is always checked against all properties access "*" even when only specific properties are accessed in destructuring
The text was updated successfully, but these errors were encountered:
ACL is skipped for accessing any properties of an object destructured into function arguments
Root Cause
Reproducible Code
Fix
"*"
(S_ALL
) property access of each function argument object if it is destructured into object properties or array elementsNotes
"*"
even when only specific properties are accessed in destructuringThe text was updated successfully, but these errors were encountered: