Skip to content

Conversation

@crynobone
Copy link
Member

No description provided.

@crynobone crynobone force-pushed the where-invalid-operator branch from 5a92005 to f303beb Compare September 9, 2024 08:45
… and `whereJsonLength` to ignore invalid `$operator` Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
@crynobone crynobone force-pushed the where-invalid-operator branch from ea2559e to 4ff4011 Compare September 9, 2024 09:11
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
@crynobone crynobone changed the title Fixes whereDate, whereDay, whereMonth, whereTime, whereYear and whereJsonLength to ignore invalid $operator [10.x] Fixes whereDate, whereDay, whereMonth, whereTime, whereYear and whereJsonLength to ignore invalid $operator Sep 9, 2024
MySQLPlatform::class,
MySQL57Platform::class,
MySQL80Platform::class,
MySQL84Platform::class,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we move these changes to a separate PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10.x is currently on security only updates.

@rodrigopedra
Copy link
Contributor

Mind if I ask why? Or what is this trying to solve?

Isn't it better to throw an InvalidArgumentException?

I mean, if a particular DBMS supports an operator not listed as valid within the class, I guess the developer would be surprised by this behavior.

@GrahamCampbell
Copy link
Collaborator

Mind if I ask why? Or what is this trying to solve?

I assume the issue is SQL injection, where the operator comes from user input? We have a similar fallback system for when an invalid sort direction is passed to order by, for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants