[BUGFIX] Ensure proper encapsulation of comparisons with QueryBuilder
When using a TCA table without deleted, or any other enablefields except "endtime", then the SQL query is built in a wrong fashion both in PageRepository and BackendUtility. Thee source of this disaster is inproper encapsulation in parenthesis when comparisons are build. Instead of simply adding a manual "()" around the or() comparisons, this change adjusts CompositionExpresion to properly add corresponding parenthesis, which ensure this in every case and avoid missing usages. A couple of tests are adjusted to properly reflect this change. Resolves: #89616 Releases: main Change-Id: I4aed140cbca5b4b40dfacd459a4c3aa30549b582 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/76481 Tested-by:core-ci <typo3@b13.com> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
Susanne Moog <look@susi.dev> Tested-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Susanne Moog <look@susi.dev> Reviewed-by:
Stefan Bürk <stefan@buerk.tech>
Showing
- typo3/sysext/backend/Tests/Functional/Utility/BackendUtilityTest.php 102 additions, 9 deletions...t/backend/Tests/Functional/Utility/BackendUtilityTest.php
- typo3/sysext/core/Classes/Database/Query/Expression/CompositeExpression.php 1 addition, 1 deletion...Classes/Database/Query/Expression/CompositeExpression.php
- typo3/sysext/core/Tests/Functional/Domain/Repository/PageRepositoryTest.php 6 additions, 6 deletions...Tests/Functional/Domain/Repository/PageRepositoryTest.php
- typo3/sysext/core/Tests/Unit/Authentication/BackendUserAuthenticationTest.php 5 additions, 5 deletions...sts/Unit/Authentication/BackendUserAuthenticationTest.php
- typo3/sysext/core/Tests/Unit/Database/Query/QueryBuilderTest.php 9 additions, 9 deletions...ysext/core/Tests/Unit/Database/Query/QueryBuilderTest.php
- typo3/sysext/core/Tests/Unit/Database/Query/Restriction/DefaultRestrictionContainerTest.php 1 addition, 1 deletion...ase/Query/Restriction/DefaultRestrictionContainerTest.php
- typo3/sysext/core/Tests/Unit/Database/Query/Restriction/EndTimeRestrictionTest.php 1 addition, 1 deletion...nit/Database/Query/Restriction/EndTimeRestrictionTest.php
- typo3/sysext/core/Tests/Unit/Database/Query/Restriction/FrontendGroupRestrictionTest.php 2 additions, 2 deletions...tabase/Query/Restriction/FrontendGroupRestrictionTest.php
- typo3/sysext/core/Tests/Unit/Database/Query/Restriction/FrontendRestrictionContainerTest.php 9 additions, 9 deletions...se/Query/Restriction/FrontendRestrictionContainerTest.php
- typo3/sysext/core/Tests/Unit/Database/Query/Restriction/LimitToTablesRestrictionContainerTest.php 1 addition, 1 deletion...ery/Restriction/LimitToTablesRestrictionContainerTest.php
- typo3/sysext/core/Tests/Unit/Database/Query/Restriction/PagePermissionRestrictionTest.php 2 additions, 2 deletions...abase/Query/Restriction/PagePermissionRestrictionTest.php
- typo3/sysext/core/Tests/Unit/Database/Query/Restriction/WorkspaceRestrictionTest.php 4 additions, 4 deletions...t/Database/Query/Restriction/WorkspaceRestrictionTest.php
- typo3/sysext/core/Tests/UnitDeprecated/Database/Query/Restriction/BackendWorkspaceRestrictionTest.php 4 additions, 4 deletions...ase/Query/Restriction/BackendWorkspaceRestrictionTest.php
- typo3/sysext/core/Tests/UnitDeprecated/Database/Query/Restriction/FrontendWorkspaceRestrictionTest.php 3 additions, 3 deletions...se/Query/Restriction/FrontendWorkspaceRestrictionTest.php
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Typo3DbQueryParserTest.php 75 additions, 9 deletions...it/Persistence/Generic/Storage/Typo3DbQueryParserTest.php
Please register or sign in to comment