Your AJAX request will use the same cookie/authentication as you use
normally.  I would check the access control on the route you are
POSTing to with your AJAX request.  My guess is that you are having an
issue with ROLEs or user type.  Remember that firewalls/access control
(ROLES) can (and often are) cascading.

On Jun 2, 11:13 am, winzou <alexandre.ba...@gmail.com> wrote:
> Hi all,
>
> I'm using some ajax features with Symfony2 and jQuery. All is working well,
> except the case when an ajax request encounters an AccessDeniedException.
> The behavior in the usual case is to redirect to the login page, I'm ok with
> that. But, when it's an XmlHttpRequest, with a Json RequestFormat... why
> this exception still wants to redirect?
>
> First: is this behavior on purpose or not?
> And then, is there any way to disable redirection on an ajax request, and
> instead sending a json error message with a 500 error code?
>
> Thanks a lot

-- 
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