From f66a131a9cf3611eb685167ba8f84fcf6fffba22 Mon Sep 17 00:00:00 2001 From: Cody Henthorne Date: Mon, 21 Sep 2026 13:07:51 -0400 Subject: [PATCH] Prevent vcard parse error from crashing. --- .../thoughtcrime/securesms/contactshare/ContactCardReader.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/contactshare/ContactCardReader.kt b/app/src/main/java/org/thoughtcrime/securesms/contactshare/ContactCardReader.kt index 1b5ef0befd..0eafa8ca60 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/contactshare/ContactCardReader.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/contactshare/ContactCardReader.kt @@ -22,7 +22,6 @@ import org.thoughtcrime.securesms.dependencies.AppDependencies import org.thoughtcrime.securesms.mms.PartAuthority import org.thoughtcrime.securesms.recipients.Recipient import org.thoughtcrime.securesms.util.SignalE164Util -import java.io.IOException /** Reads a contact card off a uri, either an address book entry or a vcard attachment. */ class ContactCardReader(context: Context) { @@ -112,7 +111,7 @@ class ContactCardReader(context: Context) { val vcard = Ezvcard.parse(stream).first() ?: return@use null VCardUtil.getContactFromVcard(vcard) } - } catch (e: IOException) { + } catch (e: Exception) { Log.w(TAG, "Failed to parse the vcard.", e) null }