Opened 3 years ago

Closed 3 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: UI/UX:


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 3 years ago.
Patch + test case

Download all attachments as: .zip

Change History (4)

Changed 3 years ago by zyga

Patch + test case

comment:1 Changed 3 years ago by apollo13

  • Component changed from Uncategorized to Database layer (models, ORM)
  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 3 years ago by ramiro

Duplicate of #13648.

comment:3 Changed 3 years ago by ramiro

  • Resolution set to duplicate
  • Status changed from new to closed

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.