[#1356] Do not report caught exceptions

- Although GlobalCrashReporter is built primarily as an interface for the locale exceptions reporting using LocalCrashReporter, the FirebaseCrashReporter inherits its reportCaughtException API and provides the ability to report a caught exception to remote crashyltics service. This commit disables this API for FirebaseCrashReporter.
- Closes #1356
This commit is contained in:
Honza Rychnovský 2024-04-18 08:10:46 +02:00 committed by GitHub
parent 81508f6466
commit 895d692588
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -69,7 +69,12 @@ private class FirebaseCrashReporterImpl(
) : CrashReporter {
@AnyThread
override fun reportCaughtException(exception: Throwable) {
firebaseCrashlytics.recordException(exception)
error(
"Although most of the sensitive model objects implement custom [toString] methods to redact information" +
" if they were to be logged (which includes exceptions), we're encouraged to disable caught exception" +
" reporting to the remote Crashlytics service due to its security risk. Use the the local variant of" +
" the reporter to report caught exception - [LocalCrashReporter]."
)
}
override fun enable() {