#34459: SearchVector() can return query strings that are unsafe to combine.
----------------------------------+------------------------------------
Reporter: Patryk Zawadzki | Owner: (none)
Type: Bug | Status: new
Component: contrib.postgres | Version: 4.2
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Comment (by Mariusz Felisiak):
Replying to [comment:10 Florian Apolloner]:
> > Unfortunately, it's sometimes used together with uncomposed SQL
statements causing issues when binding parameters. IMO, we should escape %
when we know that the parameters are bound later, e.g.
>
> Ugh, we should probably not use `compose_sql` then
Escaping `%` sounds like a reasonable compromise to me, we already do this
in schema editors, e.g. in
[https://github.com/django/django/blob/38e63c9e61152682f3ff982c85a73793ab6d3267/django/db/backends/mysql/schema.py#L59-L60
MySQL] or
[https://github.com/django/django/blob/38e63c9e61152682f3ff982c85a73793ab6d3267/django/db/backends/postgresql/schema.py#L59-L60
PostgreSQL]. Also, we avoid side-effect by providing the `quote_params`
argument.
--
Ticket URL: <https://code.djangoproject.com/ticket/34459#comment:12>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070187522743f2-34e4f398-f15e-463c-9c53-8fc1e7cfad18-000000%40eu-central-1.amazonses.com.