Bug #36894

[felogin] Wrong action url when nested array is passed

Added by Tymoteusz Motylewski over 7 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2012-05-06
Due date:
% Done:

100%

TYPO3 Version:
4.6
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If you have login form on page with url like this:
index.php?id=10&L=3&tx_someext[@widget_0][currentPage]=3

Action url of login form will point to:
index.php?id=10&L=3&tx_someext[@widget_0]=Array

The problem is in method tx_felogin_pi1->getPreserveGetVars() (called from getPageLink() ).
This method assumes that no nested arrays are passed as parameter.

$params .= '&' . $key . '[' . $key1 . ']=' . $val1;

felogin.patch View - felogin Patch (2.03 KB) Horst Prote, 2012-05-23 16:30

felogin.patch View (2.18 KB) Horst Prote, 2012-05-25 15:11


Related issues

Related to TYPO3 Core - Bug #23324: getPreserveGetVars does not work as expected Closed 2010-07-31
Related to TYPO3 Core - Bug #19938: warning: in_array wrong datatype Closed 2009-01-30
Duplicated by TYPO3 Core - Bug #48005: getPreserveGetVars does not work with nested arrays Rejected 2013-05-07

Associated revisions

Revision a0f4d13c (diff)
Added by Jigal van Hemert about 7 years ago

[BUGFIX] EXT:felogin: Multiple bugs with preserveGETvars

Refactor and fix handling of preserveGETvars in felogin. * Add support for multi dimensional arrays * urlencode() values * Preserve only parameters defined in 'preserveGETvars'

The patch adds a new ArrayUtility method to handle
recursive array intersections. See the unit tests for details.

Change-Id: I90e2f8eb79586369a9c15c7ef19f7658b1d65ed3
Fixes: #19938
Fixes: #23324
Fixes: #23649
Fixes: #36894
Fixes: #38589
Releases: 6.0, 4.7
Reviewed-on: http://review.typo3.org/7638
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn

Revision 9eca09b0 (diff)
Added by Jigal van Hemert almost 7 years ago

[BUGFIX] EXT:felogin: Multiple bugs with preserveGETvars

Refactor and fix handling of preserveGETvars in felogin. * Add support for multi dimensional arrays * urlencode() values * Preserve only parameters defined in 'preserveGETvars'

The patch adds a new ArrayUtility method to handle
recursive array intersections. See the unit tests for details.

Change-Id: I90e2f8eb79586369a9c15c7ef19f7658b1d65ed3
Fixes: #19938
Fixes: #23324
Fixes: #23649
Fixes: #36894
Fixes: #38589
Releases: 6.0, 4.7
Reviewed-on: https://review.typo3.org/16452
Reviewed-by: Markus Klein
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn

History

#1 Updated by Horst Prote over 7 years ago

I hit this and the related issue #23324 some days ago.

Here's my patch for both.

#2 Updated by Markus Klein over 7 years ago

Thank you Horst.
Would you mind pushing your patch to gerrit?

If you need more information on this, have a look at:
http://wiki.typo3.org/Contribution_Walkthrough_Tutorials

#3 Updated by Horst Prote over 7 years ago

Markus Klein wrote:

Would you mind pushing your patch to gerrit?

If you need more information on this, have a look at:
http://wiki.typo3.org/Contribution_Walkthrough_Tutorials

I read the tutorial and think it's to complicated for me doing a quick "pushing the patch" besides my normal work. Maybe I'll find the time in one or two weeks. But I don't mind if anybody else pushes my patch to gerrit.

By the way my first patch generated a Log entry each time

$var[0]
runs empty. Here's the updated patch.

#4 Updated by Gerrit Code Review over 7 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11642

#5 Updated by Gerrit Code Review over 7 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11642

#6 Updated by Gerrit Code Review over 7 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7638

#7 Updated by Gerrit Code Review over 7 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7638

#8 Updated by Gerrit Code Review over 7 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7638

#9 Updated by Gerrit Code Review over 7 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7638

#10 Updated by Gerrit Code Review over 7 years ago

Patch set 7 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7638

#11 Updated by Gerrit Code Review about 7 years ago

Patch set 8 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7638

#12 Updated by Gerrit Code Review about 7 years ago

Patch set 9 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7638

#13 Updated by Gerrit Code Review about 7 years ago

Patch set 10 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7638

#14 Updated by Gerrit Code Review about 7 years ago

Patch set 11 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7638

#15 Updated by Gerrit Code Review about 7 years ago

Patch set 12 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7638

#16 Updated by Gerrit Code Review about 7 years ago

Patch set 13 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7638

#17 Updated by Gerrit Code Review about 7 years ago

Patch set 14 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7638

#18 Updated by Gerrit Code Review about 7 years ago

Patch set 15 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7638

#19 Updated by Gerrit Code Review about 7 years ago

Patch set 16 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7638

#20 Updated by Gerrit Code Review about 7 years ago

Patch set 17 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7638

#21 Updated by Jigal van Hemert about 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#22 Updated by Gerrit Code Review about 7 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/16452

#23 Updated by Gerrit Code Review almost 7 years ago

Patch set 2 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/16452

#24 Updated by Jigal van Hemert almost 7 years ago

  • Status changed from Under Review to Resolved

#25 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF