From 97a6f91451f3242e7550a03cdcad9e40fe9cb9f0 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 5 May 2014 10:03:31 +0200 Subject: [PATCH] fix: is_address, is_private_key: check that text is not empty --- lib/wallet.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/wallet.py b/lib/wallet.py index e124cf040..9e354b29f 100644 --- a/lib/wallet.py +++ b/lib/wallet.py @@ -1667,6 +1667,8 @@ class Wallet(object): @classmethod def is_address(self, text): + if not text: + return False for x in text.split(): if not bitcoin.is_address(x): return False @@ -1674,6 +1676,8 @@ class Wallet(object): @classmethod def is_private_key(self, text): + if not text: + return False for x in text.split(): if not bitcoin.is_private_key(x): return False