From 416b68705493a232818c28817129a126791147e8 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Fri, 26 Oct 2018 19:31:20 +0200 Subject: [PATCH] storage: add a sanity check see #4803 --- electrum/storage.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/electrum/storage.py b/electrum/storage.py index 22b4fb61b..16a4cc90d 100644 --- a/electrum/storage.py +++ b/electrum/storage.py @@ -175,6 +175,8 @@ class WalletStorage(JsonDB): self.print_error('Failed to convert label to json format', key) continue self.data[key] = value + if not isinstance(self.data, dict): + raise WalletFileException("Malformed wallet file (not dict)") # check here if I need to load a plugin t = self.get('wallet_type')