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
As a potential solution, the initProperty function can be used to get us partially there. The initProperty function and friends, however, should be useful as a solution for the specific problem of “Object Injection Sink” as it appears throughout the rest of the codebase as well.
As noted by ljharb, the implementation of omit can actually be implemented using:
ljharb: for omit tho, there's a lot better ways to implement it like function omit(obj, keys) { return Object.fromEntries(Object.entries(obj).filter(([k]) => !keys.includes(k))); }
Performance can be a deciding factor on what the implementation should look like here as it is related to #27.
Notably, the for...in loop enumerates properties in the prototype chain as well.1 This can be used to dynamically create the list of disallowed property keys by using an Object literal (available via syntax {}) as input (as opposed to a POJO, which normally has a null prototype available via new Object(null)).
Codacy detected an issue:
Message:
Generic Object Injection Sink
Currently on:
The text was updated successfully, but these errors were encountered: