mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Statement in Where-Clause are not wrapped in brackets anymore #6679
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @LinkingYou on GitHub (Apr 6, 2021).
There is a critical change in doctrine/orm since version 2.8.3.
Here is simple example for a query with multiple where expressions:
In Version 2.8.2 this results in:
SELECT c0_.id AS id_0, c0_.first_name AS first_name_1, c0_.last_name AS last_name_2, c0_.active AS active_3 FROM customer c0_ WHERE c0_.active = 1 AND (c0_.first_name LIKE ? OR c0_.last_name LIKE ?)... but now in version 2.8.3 i get this:
SELECT c0_.id AS id_0, c0_.first_name AS first_name_1, c0_.last_name AS last_name_2, c0_.active AS active_3 FROM customer c0_ WHERE c0_.active = 1 AND c0_.first_name LIKE ? OR c0_.last_name LIKE ?In my opinion this is very critical. This has led to security problems in several of my applications.
@beberlei commented on GitHub (Apr 6, 2021):
Uh, will take a look
@beberlei commented on GitHub (Apr 6, 2021):
Indeed, and its already fixed https://github.com/doctrine/orm/pull/8591 - i will release 2.8.4 immediately.