[BUGFIX] Escape regex chars when building sWordRegEx 66/37366/2
authorAlexander Stehlik <alexander.stehlik@gmail.com>
Fri, 27 Feb 2015 19:13:53 +0000 (20:13 +0100)
committerNicole Cordes <typo3@cordes.co>
Sat, 28 Feb 2015 18:53:26 +0000 (19:53 +0100)
commit40281c48a5d846c4252c0e0f135687ebad6aea04
tree45fdfb627110e02421d452306e4709fe09b39af6
parent9bfc33039a7d567cf6db7c4f4e947fbd35bc5d6b
[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/37366
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/frontend/Classes/Page/PageGenerator.php
typo3/sysext/frontend/Tests/Unit/Page/Fixtures/PageGeneratorFixture.php
typo3/sysext/frontend/Tests/Unit/Page/PageGeneratorTest.php