[fix] encryption page

This commit is contained in:
Adrien Beudin 2019-09-25 10:46:02 +02:00
parent 7bebe0eec3
commit 3f484ece0c

View File

@ -42,7 +42,7 @@ def makeform(template, settings, gallery_settings):
def encrypt(password, template, gallery_path, settings, gallery_settings):
encrypted_template = template.get_template("encrypted.html")
index_plain = Path("build").joinpath(gallery_path, "index.html")
encrypted = check_output('cat %s | openssl enc -e -base64 -A -aes-256-cbc -pass pass:"%s"' % (index_plain, password), shell=True)
encrypted = check_output('cat %s | openssl enc -e -base64 -A -aes-256-cbc -md md5 -pass pass:"%s"' % (index_plain, password), shell=True)
html = encrypted_template.render(
settings=settings,
form=makeform(template, settings, gallery_settings),