Browse Source

Prevent empty passwords

pull/385/head
Bowen Ding 6 years ago
parent
commit
9ebab43f07
  1. 3
      sigal/plugins/encrypt/encrypt.py

3
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:

Loading…
Cancel
Save