From 9adc4d30807030ea7d559d2a52d02a9bb3f8eeb2 Mon Sep 17 00:00:00 2001 From: mpbw2 <59324545+mpbw2@users.noreply.github.com> Date: Mon, 17 Jul 2023 08:40:35 -0400 Subject: [PATCH] Catch additional exception types when validating intents (#2618) --- src/Android/Utilities/IntentExtensions.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Android/Utilities/IntentExtensions.cs b/src/Android/Utilities/IntentExtensions.cs index fc6242821..746cf4738 100644 --- a/src/Android/Utilities/IntentExtensions.cs +++ b/src/Android/Utilities/IntentExtensions.cs @@ -1,5 +1,6 @@ using Android.Content; using Android.OS; +using Java.Lang; namespace Bit.Droid.Utilities { @@ -13,7 +14,12 @@ namespace Bit.Droid.Utilities // Note: getting the bundle like this will cause to call unparcel() internally var b = intent?.Extras?.GetBundle("trashstringwhichhasnousebuttocheckunparcel"); } - catch (BadParcelableException) + catch (Exception ex) when + ( + ex is BadParcelableException || + ex is ClassNotFoundException || + ex is RuntimeException + ) { intent.ReplaceExtras((Bundle)null); }