-
-
Notifications
You must be signed in to change notification settings - Fork 62
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I have a contact with the name Firstname "Some Nickname" Lastname, and this is triggering errors in SQL statements:
[Error]: During sqlite3_prepare_v2(): near "Some": syntax error
-> Query: "SELECT json_object('id', message._id, 'b', message.body, 'f', message.from_recipient_id, 'tr', thread.recipient_id, 'o', (message.type & 0x1F) IN (2,11,21,22,23,24,25,26), 'd', (message.date_received / 1000 - 1404165600), 'p', SUBSTR("Firstname "Some Nickname" Lastname (_id40)/Firstname "Some Nickname" Lastname.html", 1, LENGTH("Firstname "Some Nickname" Lastname (_id40)/Firstname "Some Nickname" Lastname.html") - 5)) AS line, attachment._id AS rowid, -1 AS uniqueid FROM message LEFT JOIN thread ON thread._id IS message.thread_id LEFT JOIN attachment ON attachment.message_id IS message._id AND attachment.content_type = 'text/x-signal-plain' AND attachment.quote = 0 WHERE message._id = ?
[Warning]: Search_idx query failed or no results
I was surprised to see a SQL string escape error in a function with prepare in the name, but then I looked at the source code and saw that it is just string concatenating the query instead of parameterizing it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working