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
{{ message }}
This repository was archived by the owner on Mar 22, 2022. It is now read-only.
In the restrict-to-owner hook, the code that allows authorization checks to be by-passed for internal system calls:
if (!hook.params.provider) { return hook; }
is currently done AFTER the check to see if a hook.id was passed in:
if (!hook.id) { throw new errors.MethodNotAllowed('The restrictToOwner hook should only be used on the 'get', 'update', 'patch' and 'remove' service methods.'); }
This prevents an internal service from calling service.remove(null) to delete the entire collection. The order of the two checks should be reversed.
The text was updated successfully, but these errors were encountered:
In the restrict-to-owner hook, the code that allows authorization checks to be by-passed for internal system calls:
if (!hook.params.provider) { return hook; }
is currently done AFTER the check to see if a hook.id was passed in:
if (!hook.id) { throw new errors.MethodNotAllowed('The restrictToOwner hook should only be used on the 'get', 'update', 'patch' and 'remove' service methods.'); }
This prevents an internal service from calling service.remove(null) to delete the entire collection. The order of the two checks should be reversed.
The text was updated successfully, but these errors were encountered: