Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Authentication : app_dev.php/_wdt/511509b611682 instead of homepage

Tags:

symfony

I'm looking at security in Symfony 2.0 and I have a problem I can't explain.

My security bundle is very simple for now.

I try to put everything working before putting real providers.

So, now, when I go on the site, It sends me on the login form as expected. I put the user and the password and then, instead of home page, i am send to "/.../app_dev.php/_wdt/511509b611682" (different number each time).

My user isn't marked as authenticated in the debug toolbar.

If i take off the end of the url, i arrive on homepage. My user seems to be identified and authenticated in the debug toolbar.

This arrives only in dev environment. In prod environment, it seems to work as expected.

Thanks for your help

like image 770
fatbob Avatar asked Feb 11 '13 12:02

fatbob


1 Answers

Further to @artworkad's answer, you have to add the dev firewall before your main firewall, otherwise it will never match:

security:
    firewalls:
        dev:
            pattern:  ^/(_(profiler|wdt)|css|images|js)/
            security: false
        main:
            pattern: ^/
            #...
like image 60
Tamlyn Avatar answered Sep 21 '22 04:09

Tamlyn