Closed (fixed)
Project:
Salesforce Suite
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
3 Apr 2017 at 13:54 UTC
Updated:
21 Jan 2019 at 21:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
acrosmanI think the escaping could happen during
__toString()to avoid any BC issues and ensure all query values were checked, although for the sake of consistency it would be nice to have a parent class of both SelectQuery and SelectQueryRaw that provided a sanitizing utility function that could be used by module developers who need to write a raw query.I'll try to get together a D8 patch.
Comment #3
acrosmanPatch (D8 only) adds a base class that provides a sanitizing function the other two existing classes extend that class and the base class implements the existing interface. Raw queries and query conditions provided as strings are not sanitized, but conditions that are structured as field, operator, and value arrays sanitize the value.
Comment #5
aaronbaumanI guess there are *possible* but very unlikely BC issues here, but probably negligible.
Thanks for the patch!