-
Notifications
You must be signed in to change notification settings - Fork 164
No Segment Routes #87
Comments
@darkmatus please expose relevant configuration. |
/* some Code */
'router' => array(
'routes' => array(
'profile' => array(
'type' => 'Segment',
'options' => array(
'route' => '/profile/[:action/[:id]]',
'defaults' => array(
'controller' => 'profile',
'action' => 'index',
),
),
),
/* more routes here */ The route above solves every time in an 403. 'router' => array(
'routes' => array(
'home' => array(
'type' => 'Literal',
'options' => array(
'route' => '/',
'defaults' => array(
'controller' => 'news',
'action' => 'index',
)
) |
And what is the bjy-authorize config associated to those? Are you eventually able to get the detailed exception (if any is thrown)? |
I get no Exception only the 403 Forbidden You are not authorized to access Forum\Controller\Forum ::indexAction() . 'guards' => array(
'BjyAuthorize\Guard\Controller' => array(
array('controller' => 'zfcuser', 'roles' => array()),
array('controller' => 'profile', 'roles' => array('user')),
array('controller' => 'news', 'roles' => array()),
array('controller' => 'news_admin', 'roles' => array('admin')),
array('controller' => 'admin', 'roles' => array('admin')),
array('controller' => 'forum', 'roles' => array('user', 'admin')),
array('controller' => 'Application\Controller\Index', 'roles' => array('guest', 'user')),
),
'BjyAuthorize\Guard\Route' => array(
array('route' => 'zfcuser', 'roles' => array('user')),
array('route' => 'zfcuser/logout', 'roles' => array('user')),
array('route' => 'zfcuser/changepassword', 'roles' => array('user')),
array('route' => 'zfcuser/changeemail', 'roles' => array('user')),
array('route' => 'zfcuser/login', 'roles' => array('guest')),
array('route' => 'zfcuser/register', 'roles' => array('guest')),
array('route' => 'profile', 'roles' => array('user')),
array('route' => 'news', 'roles' => array()),
array('route' => 'home/admin', 'roles' => array('admin')),
array('route' => 'admin/', 'roles' => array('admin')),
array('route' => 'show', 'roles' => array('user')),
array('route' => 'forum', 'roles' => array('user', 'admin')),
array('route' => 'home', 'roles' => array('guest', 'user')), |
Looks like you have configured the controller guard incorrectly then. This has nothing to do with routing |
But when I rewrite my routings from Segment into Iteral all works fine. |
@darkmatus that's probably because the matched controller changes. Disable bjy for some time and provide a dump of the |
Sidenote: firewalling both routes and controllers is useless.. Consider firewalling only your controllers. |
Ok, diabling the controller guard works fine. But disablingthe route guard solves in an 403. Haven't testet the RouteMatching yet. |
I simply suggest not to use the route guard ;)
|
Closing as non-issue (more like a help request) |
Every time I want to access an route defined with type segment
I get an 403 error.
At this time it's not to bad for me because im in develeopment but
later I need it working with iteral and segment.
The text was updated successfully, but these errors were encountered: