From 9b521e0847d389e456ca4772b1ce603f5ecc666c Mon Sep 17 00:00:00 2001 From: rzuasti Date: Sun, 31 May 2026 19:00:38 -0400 Subject: [PATCH] Stop interpolating raw exception into settings snackbar Defense-in-depth: the persisted value is the (XOR-obfuscated) API key, so a future SharedPreferences backend that surfaced the value in its exception could leak it through the UI. Log the detail via debugPrint and show a fixed message to the user instead. Co-Authored-By: Claude Sonnet 4.6 --- frontend/lib/settings/settings.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/lib/settings/settings.dart b/frontend/lib/settings/settings.dart index 61bbd20..5df0b1f 100644 --- a/frontend/lib/settings/settings.dart +++ b/frontend/lib/settings/settings.dart @@ -89,8 +89,9 @@ class _SettingsState extends State { UISnackbars.showError(context, 'Failed to save settings'); } } catch (e) { + debugPrint('Failed to save settings: $e'); if (!mounted) return; - UISnackbars.showError(context, 'Failed to save settings: $e'); + UISnackbars.showError(context, 'Failed to save settings'); } }