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

[BUGFIX] Harden SearchRequest against array get parameters #3063

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

smichaelsen
Copy link
Contributor

Pass filters or the q parameter as arrays like this:
https://www.example.com/search/?search[filter][0][]=type:News&search[q][]=nhsi4k1z

It will trigger a TYPO3 Exception like this:
Uncaught TYPO3 Exception: #1476107295: PHP Warning: trim() expects parameter 1 to be string, array given in /path/private/typo3conf/ext/solr/Classes/Domain/Search/SearchRequest.php line 562

This change adds a few checks to handle that case

Fixes: #3062

Pass filters or the q parameter as arrays like this:
https://www.example.com/search/?search[filter][0][]=type:News&search[q][]=nhsi4k1z

It will trigger a TYPO3 Exception like this:
Uncaught TYPO3 Exception: #1476107295: PHP Warning: trim() expects parameter 1 to be string, array given in /path/private/typo3conf/ext/solr/Classes/Domain/Search/SearchRequest.php line 562

This change adds a few checks to handle that case
@dkd-kaehm dkd-kaehm force-pushed the main branch 3 times, most recently from 363e234 to a9bae2f Compare May 17, 2024 10:41
@dkd-kaehm dkd-kaehm force-pushed the main branch 2 times, most recently from e865edc to 89d9f0d Compare July 11, 2024 17:14
@dkd-kaehm dkd-kaehm force-pushed the main branch 2 times, most recently from 16bf8c5 to dfcdd98 Compare July 30, 2024 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Passing GET parameters as array creates error log entries
2 participants