aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Cgi
diff options
context:
space:
mode:
authorYasuhito FUTATSUKI at POEM <futatuki@poem.co.jp>2018-06-06 02:18:30 +0900
committerYasuhito FUTATSUKI at POEM <futatuki@poem.co.jp>2018-06-06 02:18:30 +0900
commite591f51039f4ebc4a52d6a8aac210d8ebb7978de (patch)
tree004c9f8ba6a59659e2ea930f5f74403a269627f8 /Mailman/Cgi
parent898c692842fed6e33a4bc309d9d240721a01a4c7 (diff)
parentca506e913faa49331db68f541774fdb773653988 (diff)
downloadmailman2-e591f51039f4ebc4a52d6a8aac210d8ebb7978de.tar.gz
mailman2-e591f51039f4ebc4a52d6a8aac210d8ebb7978de.tar.xz
mailman2-e591f51039f4ebc4a52d6a8aac210d8ebb7978de.zip
merge lp:mailman up to rev 1765
Diffstat (limited to 'Mailman/Cgi')
-rw-r--r--Mailman/Cgi/listinfo.py6
-rwxr-xr-xMailman/Cgi/subscribe.py6
2 files changed, 6 insertions, 6 deletions
diff --git a/Mailman/Cgi/listinfo.py b/Mailman/Cgi/listinfo.py
index 78fda942..b55c263d 100644
--- a/Mailman/Cgi/listinfo.py
+++ b/Mailman/Cgi/listinfo.py
@@ -218,9 +218,9 @@ def list_listinfo(mlist, lang):
remote = remote.rsplit(':', 1)[0]
replacements['<mm-subscribe-form-start>'] += (
'<input type="hidden" name="sub_form_token" value="%s:%s">\n'
- % (now, Utils.sha_new(mm_cfg.SUBSCRIBE_FORM_SECRET +
- now +
- mlist.internal_name() +
+ % (now, Utils.sha_new(mm_cfg.SUBSCRIBE_FORM_SECRET + ":" +
+ now + ":" +
+ mlist.internal_name() + ":" +
remote
).hexdigest()
)
diff --git a/Mailman/Cgi/subscribe.py b/Mailman/Cgi/subscribe.py
index aefce493..b6527a2a 100755
--- a/Mailman/Cgi/subscribe.py
+++ b/Mailman/Cgi/subscribe.py
@@ -173,9 +173,9 @@ def process_form(mlist, doc, cgidata, lang):
except ValueError:
ftime = fhash = ''
then = 0
- token = Utils.sha_new(mm_cfg.SUBSCRIBE_FORM_SECRET +
- ftime +
- mlist.internal_name() +
+ token = Utils.sha_new(mm_cfg.SUBSCRIBE_FORM_SECRET + ":" +
+ ftime + ":" +
+ mlist.internal_name() + ":" +
remote1).hexdigest()
if ftime and now - then > mm_cfg.FORM_LIFETIME:
results.append(_('The form is too old. Please GET it again.'))