Le 01/06/2011 12:01, Haulyn Jason a écrit :
Hi,

I am using Security Component, it's easy, but the problem is when I
submit the username and password, I get the following:

The controller must return a response (null given). Did you forget to
add a return statement somewhere in your controller?

OK, I know I have the following function:
     /**
      * @Route("/login_check", name="account_security_check")
      */
     public function loginCheckAction()
     {
         // The security layer will intercept this request
     }

I have the configuration:
         sales:
             pattern:    ^/sales
             form_login:
                 check_path:                     /account/login_check
                 login_path:                     /account/login
The issue is here: your check_path is //accounr/login_check/ but this firewall is only enabled when the url is something like //sales/*/ so it cannot see it.
                 failure_path:                   null
                 always_use_default_target_path: false
                 default_target_path:            /
                 target_path_parameter:          _target_path
                 use_referer:                    false
                 use_forward: true
             logout:
                 path:   /account/logout
                 target: /
                 invalidate_session: false
                 delete_cookies:
                     a: { path: null, domain: null }
                     b: { path: null, domain: null }
             anonymous: ~


At least, I do not need to implement the login_check function, isn't
it? Or, what I lost?

Thanks!

Regards,



--
Christophe | Stof

--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to