Development

#6606 ([PATCH] sfGuardPlugin fails to properly response to ajax post requests)

You must first sign up to be able to contribute.

Ticket #6606 (closed defect: fixed)

Opened 9 months ago

Last modified 9 months ago

[PATCH] sfGuardPlugin fails to properly response to ajax post requests

Reported by: gluth Assigned to: fabien
Priority: major Milestone:
Component: sfGuardPlugin Version: 1.2.7
Keywords: ajax post sfGuardPlugin Cc:
Qualification: Unreviewed

Description

sfGuardPlugin fails to properly response to ajax requests, when they are send by POST method. It is not detecting that this is ajax request, and it is responding with login form.

In BasesfGuardAuthActions?.class.php / executeSignin there is:

    if ($request->isMethod('post'))

My propose, which fixed weird behaviour in Ajax powered pages:

    if ($request->isMethod('post') && !$request->isXmlHttpRequest())

Jakub Nietrzeba
PGS Software S.A.

Attachments

6606.patch (3.8 kB) - added by Pascal on 06/16/09 03:06:35.

Change History

06/11/09 19:18:38 changed by gluth

  • cc deleted.

06/16/09 03:06:06 changed by Pascal

  • summary changed from sfGuardPlugin to [PATCH] sfGuardPlugin fails to properly response to ajax post requests.

your issue looks like #6632 can you confirm ?

06/16/09 03:06:35 changed by Pascal

  • attachment 6606.patch added.

06/16/09 15:37:56 changed by gluth

Yes, the core mechanizm for this error is the same. isXmlHttpRequest() function is called only on GET queries, when it is POST there is no checking.
Jakub Nietrzeba
PGS Software S.A.

07/01/09 10:36:07 changed by fabien

  • milestone deleted.

07/01/09 10:41:57 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.

in r19772

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.