We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Seg Fault while trying to override some custom Resource access to Role with wildcard already defined.

Since Phalcon does not support wildcards for Roles, e.g:

$acl->allow("*","ErrorController","customErrorAction");

We need to permit access to all roles severally

foreach($acl->getRoles() as $role){
   $acl->allow($role->getName(), "ErrorController","customErrorAction");
}

But if we have a Role with wildcard already defined, e.g:

$acl->deny("Blocked", "*", "*");

this call will sadly fault

$acl->allow("Blocked", "IndexController","accessDeniedAction"); //php5-fpm crash. Nginx return 502

Any suggestions why this is correct behavior since stable 1.1.0?



98.9k

Can you try using Phalcon 1.2?

I need to make production release in a few weeks and beta looks risky :( Though, 1.1 makes the same as I can see. So, lets make life more interesting. Going for a 1.2 :-)