From be328d3b2609aa73b44385fd44e7a0ea996d3091 Mon Sep 17 00:00:00 2001 From: nir0s Date: Sat, 17 Feb 2018 20:25:16 +0200 Subject: [PATCH] Verify the token is not anything empty, not just "not an empty string" If you pass an empty list, tuple, False, 0, whatever.. it will assume th token is valid, which it isn't. --- logzio/handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logzio/handler.py b/logzio/handler.py index d7ab03c..9c223a5 100644 --- a/logzio/handler.py +++ b/logzio/handler.py @@ -18,7 +18,7 @@ class LogzioHandler(logging.Handler): url="https://listener.logz.io:8071", debug=False): - if token is "": + if not token: raise LogzioException("Logz.io Token must be provided") self.logzio_type = logzio_type