aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-05-21 21:04:19 +0200
committerChristian Schneppe <christian@pix-art.de>2018-05-21 21:04:19 +0200
commit0da1ddcb97fe430584a7232a29a3ca4bc01161e9 (patch)
treea478a37200e6915e662b81d2211e04da4c649947 /src/main/java/de
parent423d750431cd5ed0cb9e29f29c7f7bb466ec1d09 (diff)
explicitly set secure_delete pragma for SQLite database
Conversations stores sensitive data, such as SQLiteAxolotlStore tables, in its database. secure_delete=ON is the default for newer Android devices: https://android-review.googlesource.com/c/platform/external/sqlite/+/209123 However, older devices had it disabled by default, so any database created than has this setting disabled and it will not be updated automatically. Also, the default might be changed in the future (for example, to "FAST", added in 2017), so it is safer to set it explicitly.
Diffstat (limited to 'src/main/java/de')
-rw-r--r--src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java b/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java
index c8ecf2f6b..c15ef40e8 100644
--- a/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java
+++ b/src/main/java/de/pixart/messenger/persistance/DatabaseBackend.java
@@ -187,6 +187,7 @@ public class DatabaseBackend extends SQLiteOpenHelper {
@Override
public void onConfigure(SQLiteDatabase db) {
db.execSQL("PRAGMA foreign_keys=ON");
+ db.execSQL("PRAGMA secure_delete=ON");
}
@Override