From 557e438dc79c095b1dc444730eccf958bfed7374 Mon Sep 17 00:00:00 2001 From: M57 <41645758+Hy4ri@users.noreply.github.com> Date: Tue, 23 Jun 2026 11:44:57 +0300 Subject: [PATCH] fix(#263): log parse error in getConnectionProfiles (#332) Adds a debug log to AuthManager.getConnectionProfiles when JSON parsing fails, instead of silently swallowing the exception and returning an empty list. This helps diagnose corrupted or malicious connection profile data without affecting production stability. Closes #263 --- .../main/java/com/m57/hermescontrol/data/local/AuthManager.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/com/m57/hermescontrol/data/local/AuthManager.kt b/app/src/main/java/com/m57/hermescontrol/data/local/AuthManager.kt index f2eccc7e..da5bc8fc 100644 --- a/app/src/main/java/com/m57/hermescontrol/data/local/AuthManager.kt +++ b/app/src/main/java/com/m57/hermescontrol/data/local/AuthManager.kt @@ -103,6 +103,9 @@ object AuthManager { >() {}.type gson.fromJson(json, type) ?: emptyList() } catch (e: Exception) { + if (com.m57.hermescontrol.BuildConfig.DEBUG) { + android.util.Log.w("AuthManager", "Failed to parse connection profiles", e) + } emptyList() } }