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 }}
Repository navigation
Remote hooks called before ACL rules are applied #1191
@raymondfeng@ritch I think the expected behavior would be to have the ACL check be the first call in the stack. Or at least it should be configurable to work that way. It has some pretty serious implications, if you're not aware of this right now!
@raymondfeng@ritch I strongly believe this should be fixed ASAP. Any before remote hook defined at the models/model.js or mixin level will just execute the before hook without any regard to ACL checks. This is a security disaster waiting to happen.
ghost changed the title [-]Remote hooks called before ACL rules are applied[/-][+]70 Remote hooks called before ACL rules are applied[/+]on May 6, 2015
ghost changed the title [-]70 Remote hooks called before ACL rules are applied[/-][+]A Remote hooks called before ACL rules are applied[/+]on May 6, 2015
ghost changed the title [-]A Remote hooks called before ACL rules are applied[/-][+]70 Remote hooks called before ACL rules are applied[/+]on May 6, 2015
ghost changed the title [-]70 Remote hooks called before ACL rules are applied[/-][+]Remote hooks called before ACL rules are applied[/+]on May 6, 2015
@fabien agreed. I've implemented this as both a new feature (a new authorization hook) and a fix (ensuring we use this hook instead of adding blindly as a remotes.before() hook).
Activity
raymondfeng commentedon Mar 9, 2015
@ritch ACL check is done from one of the remote hooks. Can we ensure it's called before any other remote hooks?
ritch commentedon Mar 9, 2015
If you create the hook after boot it should run in the expected order.
fabien commentedon Apr 25, 2015
@raymondfeng @ritch I think the expected behavior would be to have the ACL check be the first call in the stack. Or at least it should be configurable to work that way. It has some pretty serious implications, if you're not aware of this right now!
fabien commentedon Apr 25, 2015
@raymondfeng @ritch I strongly believe this should be fixed ASAP. Any before remote hook defined at the
models/model.jsor mixin level will just execute the before hook without any regard to ACL checks. This is a security disaster waiting to happen.[-]ACLs called after before hook[/-][+]Remote hooks called before ACL rules are applied[/+][-]Remote hooks called before ACL rules are applied[/-][+]70 Remote hooks called before ACL rules are applied[/+][-]70 Remote hooks called before ACL rules are applied[/-][+]A Remote hooks called before ACL rules are applied[/+][-]A Remote hooks called before ACL rules are applied[/-][+]70 Remote hooks called before ACL rules are applied[/+][-]70 Remote hooks called before ACL rules are applied[/-][+]Remote hooks called before ACL rules are applied[/+]ritch commentedon May 6, 2015
@fabien agreed. I've implemented this as both a new feature (a new authorization hook) and a fix (ensuring we use this hook instead of adding blindly as a
remotes.before()hook).See #1370
fabien commentedon May 6, 2015
@ritch thanks!
ritch commentedon May 12, 2015
@Toreader @fabien fixed @ 2.17.3