From: Ralf Jung Date: Sun, 10 Jun 2018 17:40:56 +0000 (+0200) Subject: Mailman CAPTCHA: rename displayhtml -> display X-Git-Url: https://git.ralfj.de/ansible.git/commitdiff_plain/16805458c74b66d6e3c0f5b6e3559145488c7283?ds=inline Mailman CAPTCHA: rename displayhtml -> display --- diff --git a/roles/email/files/mailman-patched/Captcha.py b/roles/email/files/mailman-patched/Captcha.py index 42f75f0..ae979d4 100644 --- a/roles/email/files/mailman-patched/Captcha.py +++ b/roles/email/files/mailman-patched/Captcha.py @@ -18,7 +18,7 @@ import random from Mailman import Utils -def displayhtml(mlist, captchas): +def display(mlist, captchas): """Returns a CAPTCHA question, the HTML for the answer box, and the data to be put into the CSRF token""" idx = random.randrange(len(captchas)) diff --git a/roles/email/files/mailman-patched/Cgi/listinfo.py b/roles/email/files/mailman-patched/Cgi/listinfo.py index 0ce6393..b46bab1 100644 --- a/roles/email/files/mailman-patched/Cgi/listinfo.py +++ b/roles/email/files/mailman-patched/Cgi/listinfo.py @@ -221,7 +221,7 @@ def list_listinfo(mlist, lang): # for our hash so it doesn't matter. remote = remote.rsplit(':', 1)[0] # get CAPTCHA data - (captcha_question, captcha_box, captcha_idx) = Captcha.displayhtml(mlist, mm_cfg.CAPTCHAS) + (captcha_question, captcha_box, captcha_idx) = Captcha.display(mlist, mm_cfg.CAPTCHAS) replacements[''] = captcha_question replacements[''] = captcha_box # fill form