#6211: Auth Login Redirect Forgets Query String Parameters
--------------------------------------+-------------------------------------
    Reporter:  harking                |         Owner:           
        Type:  Bug                    |        Status:  reopened 
    Priority:  Medium                 |     Milestone:  1.2.x.x  
   Component:  Auth                   |       Version:  1.2 Final
    Severity:  Normal                 |    Resolution:           
    Keywords:  auth get query string  |   Php_version:  n/a      
Cake_version:                         |  
--------------------------------------+-------------------------------------
Changes (by harking):

  * status:  closed => reopened
  * resolution:  fixed =>

Comment:

 I've attached a patch to the test you made that replicates the issue I
 see. [[BR]]
 [[BR]]
 In the test you created, I think the use of {{{Router::parse() for setting
 $this->Controller->params['url']['url']}}} is incorrect, and instead
 {{{$this->Controller->params = Dispatcher::parseParams($url);}}} should be
 used. The attached patch includes this change.[[BR]]
 [[BR]]
 That is how the Dispatcher prepares the params array before handing
 control over to the Controller. See around line 118 of
 dispatcher.php.[[BR]]
 [[BR]]
 The root of the issue seems to be that in the {{{Auth::startup()}}}
 method, it uses {{{$controller->params['url']['url']}}} for the url that
 will be used for the redirect after login. This will work great if that
 url were generated from {{{Router::parse()}}}, but instead is generated
 from the {{{Dispatcher::parseParams()}}}, which does not include the query
 string into {{{params['url']['url']}}}.

-- 
Ticket URL: <https://trac.cakephp.org/ticket/6211#comment:4>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tickets cakephp" group.
To post to this group, send email to tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to 
tickets-cakephp+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to