From 700e06dcb9ee54001dec2b1cc4df8a3ce63b714e Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Thu, 14 Jun 2018 14:24:47 +0200 Subject: [PATCH] Catch SecurityException when opening URIs during decrypt --- .../keychain/operations/results/OperationResult.java | 1 + .../keychain/pgp/PgpDecryptVerifyOperation.java | 7 ++++++- OpenKeychain/src/main/res/values/strings.xml | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/OperationResult.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/OperationResult.java index 1320ac282..f3385d9fc 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/OperationResult.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/OperationResult.java @@ -648,6 +648,7 @@ public abstract class OperationResult implements Parcelable { MSG_DC_ERROR_INVALID_DATA (LogLevel.ERROR, R.string.msg_dc_error_invalid_data), MSG_DC_ERROR_IO (LogLevel.ERROR, R.string.msg_dc_error_io), MSG_DC_ERROR_INPUT (LogLevel.ERROR, R.string.msg_dc_error_input), + MSG_DC_ERROR_INPUT_DENIED (LogLevel.ERROR, R.string.msg_dc_error_input_denied), MSG_DC_ERROR_NO_DATA (LogLevel.ERROR, R.string.msg_dc_error_no_data), MSG_DC_ERROR_NO_KEY (LogLevel.ERROR, R.string.msg_dc_error_no_key), MSG_DC_ERROR_NO_SIGNATURE (LogLevel.ERROR, R.string.msg_dc_error_no_signature), diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpDecryptVerifyOperation.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpDecryptVerifyOperation.java index 6451019a5..6a5881e79 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpDecryptVerifyOperation.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpDecryptVerifyOperation.java @@ -115,8 +115,13 @@ public class PgpDecryptVerifyOperation extends BaseOperation"No valid OpenPGP encrypted or signed data found!" "Encountered an error reading input data!" "Error opening input data stream!" + "Error opening input data stream: access denied!" "No encrypted data found in stream!" "No encrypted data with known secret key found in stream!" "Missing signature data!"