Opened 9 years ago

Closed 9 years ago

#15155 closed (duplicate)

Invalid regular expression for escaping %s substitutions in sqlite backend of django 1.2.4

Reported by: zyga Owned by: nobody
Component: Database layer (models, ORM) Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


The actual bug was discovered by zyga and fixed by apollo13 during an IRC session on #django

The issue can be reproduced by this code. Note the code sample below is using _fixed_ sqlite3 backend.

>>> from django.db import connection
>>> cursor = connection.cursor()
>>> list(cursor.execute("select strftime('%%s', date('now'))"))

The bug is caused by invalid regular expression in FORMAT_QMARK_REGEX.
I will follow-up with a patch and a test case

Attachments (1)

fix-15155.patch (1.4 KB) - added by zyga 9 years ago.
Patch + test case

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by zyga

Attachment: fix-15155.patch added

Patch + test case

comment:1 Changed 9 years ago by Florian Apolloner

Component: UncategorizedDatabase layer (models, ORM)
Has patch: set
Triage Stage: UnreviewedAccepted

comment:2 Changed 9 years ago by Ramiro Morales

Duplicate of #13648.

comment:3 Changed 9 years ago by Ramiro Morales

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top