aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure/keychain
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2015-10-08 20:07:29 +0200
committerDominik Schürmann <dominik@dominikschuermann.de>2015-10-08 20:21:02 +0200
commit1fb0ed8454c5a6cac16db336dc3af33013308d01 (patch)
tree9046e6d4ebcb11dc48830b25112604316db86567 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain
parent57a04cb8a14a4777a3d77a92952d9fbdbd72b527 (diff)
downloadopen-keychain-1fb0ed8454c5a6cac16db336dc3af33013308d01.tar.gz
open-keychain-1fb0ed8454c5a6cac16db336dc3af33013308d01.tar.bz2
open-keychain-1fb0ed8454c5a6cac16db336dc3af33013308d01.zip
Revert "Check that the encrypt input uris are not linked to our own internal storage (OKC-01-010)"
Fix was not sufficient This reverts commit b10b14d9bc737edc56af0eec3a14bed5ebf3ea39.
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java29
1 files changed, 3 insertions, 26 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java
index ebb9674bf..19603a549 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java
@@ -18,7 +18,6 @@
package org.sufficientlysecure.keychain.ui;
-import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
@@ -451,29 +450,9 @@ public class EncryptFilesFragment
}
- /**
- * Checks that the input uris are not linked to our own internal storage.
- * This prevents the encryption of our own database (-> export of whole database)
- */
- private void securityCheckInternalStorage() {
- for (FilesAdapter.ViewModel model : mFilesAdapter.mDataset) {
- File fileInput = new File(model.inputUri.getPath());
- try {
- // the canonical path of the file must not start with /data/data/org.sufficientlysecure.keychain/
- if (fileInput.getCanonicalPath().startsWith(getActivity().getApplicationInfo().dataDir)) {
- throw new RuntimeException("Encrypting OpenKeychain's private files is not allowed!");
- }
- } catch (IOException e) {
- Log.e(Constants.TAG, "Getting canonical path failed!", e);
- }
- }
- }
-
- /**
- * Prepares mOutputUris, either directly and returns false, or indirectly
- * which returns true and will call cryptoOperation after mOutputUris has
- * been set at a later point.
- */
+ // prepares mOutputUris, either directly and returns false, or indirectly
+ // which returns true and will call cryptoOperation after mOutputUris has
+ // been set at a later point.
private boolean prepareOutputStreams() {
switch (mAfterEncryptAction) {
@@ -549,8 +528,6 @@ public class EncryptFilesFragment
}
- securityCheckInternalStorage();
-
return actionsParcel;
}