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
This commit is contained in:
1 file changed
+3
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user