[BUGFIX] Escape regex chars when building sWordRegEx 28/37328/2
authorAlexander Stehlik <alexander.stehlik@gmail.com>
Fri, 27 Feb 2015 19:13:53 +0000 (20:13 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 28 Feb 2015 18:40:11 +0000 (19:40 +0100)
commita0125369e151d63566cfa23832db31cd67a916b3
treee6101c63d9c917d988dca90ea5ab7097d40057b2
parentafef2225aaad1871eec696278e390f6ae5913056
[BUGFIX] Escape regex chars when building sWordRegEx

The submitted sword_list GET parameters are parsed through
preg_quote() when loaded into  TSFE->sWordRegEx to prevent
invalid regular expressions.

The initialization is moved to a seperate method
PageGenerator::initializeSearchWordDataInTsfe() and unit
tests are added.

Releases: master, 6.2
Resolves: #41728
Change-Id: Id96fd5e201c25b06001f7e1c7811d6c38239aafa
Reviewed-on: http://review.typo3.org/37328
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/frontend/Classes/Page/PageGenerator.php
typo3/sysext/frontend/Tests/Unit/Page/Fixtures/PageGeneratorFixture.php
typo3/sysext/frontend/Tests/Unit/Page/PageGeneratorTest.php