Opened 14 years ago
Closed 14 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 |
Description
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'))")) [(u'1295827200',)]
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)
Change History (4)
by , 14 years ago
Attachment: | fix-15155.patch added |
---|
comment:1 by , 14 years ago
Component: | Uncategorized → Database layer (models, ORM) |
---|---|
Has patch: | set |
Triage Stage: | Unreviewed → Accepted |
comment:3 by , 14 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Patch + test case