Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly check for duplicate input parameters #1743

Merged
merged 2 commits into from
May 14, 2020

Conversation

aschempp
Copy link
Member

This fixes issue when manually matching requests, e.g. for the search indexer.

The mentioned issue (contao/core#4277) describes multiple cases, and it is where we added the unused argument stuff. These lines were previously added to prevent duplicate parameters in the URL.

  1. For http://example.com/foo/bar/foo/baz.html, Contao (previously) correctly rendered the page with foo being set to baz. This also allowed for duplicate page URLs (e.g. http://example.com/foo/bar/foo/bar/foo/bar/foo/baz.html and the unused argument handling wouldn't kick in.
  2. It should also not be possible to repeat a parameter that is already present in query parameters (e.g. http://example.com/foo/bar.html?foo=baz).

In Contao 3, this meant checking the $_GET array for duplicate data. In Symfony, this should only match on the current request.

Warning: what this PR cannot solve (and wasn't solved before) is actually running multiple requests that change the $_GET parameters 🤷

@aschempp aschempp added the bug label May 13, 2020
@aschempp aschempp added this to the 4.9 milestone May 13, 2020
@aschempp aschempp requested review from ausi, Toflar, leofeyer and a team May 13, 2020 20:12
@aschempp aschempp self-assigned this May 13, 2020
@leofeyer leofeyer merged commit 75f0152 into contao:4.9 May 14, 2020
@aschempp aschempp deleted the bugfix/input-enhancer branch May 28, 2020 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants