From 168eedd6aa63beef8757b5940f34f781ac5f5ba8 Mon Sep 17 00:00:00 2001 From: Filipe Belatti Date: Tue, 14 Jan 2025 20:02:27 +0000 Subject: [PATCH] Redact `auth_token` from error report --- .../pinboard/core/android/composable/ErrorReportDialog.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/fibelatti/pinboard/core/android/composable/ErrorReportDialog.kt b/app/src/main/kotlin/com/fibelatti/pinboard/core/android/composable/ErrorReportDialog.kt index 12e5998f..c1a8795d 100644 --- a/app/src/main/kotlin/com/fibelatti/pinboard/core/android/composable/ErrorReportDialog.kt +++ b/app/src/main/kotlin/com/fibelatti/pinboard/core/android/composable/ErrorReportDialog.kt @@ -88,7 +88,7 @@ fun ErrorReportDialog( appendLine("---") appendLine("This error just happened to me:") appendLine() - append(sw.toString()) + append(sw.toString().replace(regex = "&auth_token=.*[^&]".toRegex(), replacement = "")) } val emailIntent = Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:")).apply {