From 635ee3e876f5097c463485dc61044e758daf7b96 Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Wed, 6 Jun 2018 15:11:25 +0200 Subject: [PATCH] Don't pass through selection in ExternalKeychainProvider The external provider uses the selectionArgs parameter in a non-standard way, so it doesn't make sense to pass selection to the query independently. Also enabling strict mode here, to nail down the fields that can be requested to the contract of the provider. --- .../keychain/remote/KeychainExternalProvider.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/KeychainExternalProvider.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/KeychainExternalProvider.java index 6bd7179da..eb69871d2 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/KeychainExternalProvider.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/KeychainExternalProvider.java @@ -323,7 +323,8 @@ public class KeychainExternalProvider extends ContentProvider implements SimpleC orderBy = sortOrder; } - Cursor cursor = qb.query(db, projection, selection, null, groupBy, null, orderBy); + qb.setStrict(true); + Cursor cursor = qb.query(db, projection, null, null, groupBy, null, orderBy); qb.setCursorFactory(new CloseDatabaseCursorFactory()); if (cursor != null) { // Tell the cursor what uri to watch, so it knows when its source data changes