From 9ebab43f07bbf04f5ea71245d36065f2801a33f2 Mon Sep 17 00:00:00 2001 From: Bowen Ding Date: Thu, 2 Apr 2020 00:25:29 +0800 Subject: [PATCH] Prevent empty passwords --- sigal/plugins/encrypt/encrypt.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sigal/plugins/encrypt/encrypt.py b/sigal/plugins/encrypt/encrypt.py index bd94d47..2886400 100644 --- a/sigal/plugins/encrypt/encrypt.py +++ b/sigal/plugins/encrypt/encrypt.py @@ -85,7 +85,8 @@ def get_options(settings, cache): options = settings["encrypt_options"] table = str.maketrans({'"': r'\"', '\\': r'\\'}) - if "password" not in settings["encrypt_options"]: + if "password" not in settings["encrypt_options"] \ + or len(settings["encrypt_options"]["password"]) == 0: logger.error("Encrypt: no password provided") raise Abort else: