mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 01:07:47 +00:00
Escape single quotes in SQLite entries for message backups
Fixes #7491 Closes #7497
This commit is contained in:
parent
fd7a3190f8
commit
7f7aab044c
@ -143,7 +143,7 @@ public class FullBackupExporter extends FullBackupBase {
|
|||||||
for (int i=0;i<cursor.getColumnCount();i++) {
|
for (int i=0;i<cursor.getColumnCount();i++) {
|
||||||
if (cursor.getType(i) == Cursor.FIELD_TYPE_STRING) {
|
if (cursor.getType(i) == Cursor.FIELD_TYPE_STRING) {
|
||||||
statement.append('\'');
|
statement.append('\'');
|
||||||
statement.append(cursor.getString(i).replace("'", "\\'"));
|
statement.append(cursor.getString(i).replace("'", "''"));
|
||||||
statement.append('\'');
|
statement.append('\'');
|
||||||
} else if (cursor.getType(i) == Cursor.FIELD_TYPE_FLOAT) {
|
} else if (cursor.getType(i) == Cursor.FIELD_TYPE_FLOAT) {
|
||||||
statement.append(cursor.getFloat(i));
|
statement.append(cursor.getFloat(i));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user