#24605: Database identifiers are not properly escaped in some queries
-------------------------------------+-------------------------------------
Reporter: kurevin | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.7
(models, ORM) |
Severity: Normal | Resolution:
Keywords: regresion, database | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by kurevin):
Done.
Basic query to reproduce:
{{{
>>> models.Amodel.objects.exclude(Q(bmodel__id=False) &
Q(cmodel__isnull=True)).query.__str__()
u'SELECT "TestTest_amodel"."id", "TestTest_amodel"."bmodel_id" FROM
"TestTest_amodel" WHERE NOT ("TestTest_amodel"."bmodel_id" = 0 AND
"TestTest_amodel"."id" IN (SELECT U0."id" AS "id" FROM TestTest_amodel U0
LEFT OUTER JOIN "TestTest_cmodel" U1 ON ( U0."id" = U1."amodel_id" ) WHERE
(U1."id" IS NULL AND U0."id" = (TestTest_amodel."id"))))'
}}}
Bug is DB backend agnostic.
--
Ticket URL: <https://code.djangoproject.com/ticket/24605#comment:3>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.f9a73abc7cf1d75fc9bfcbe5fee25dcb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.