diff options
author | Jim Popovitch <jimpop@gmail.com> | 2015-06-23 13:40:09 +0000 |
---|---|---|
committer | Jim Popovitch <jimpop@gmail.com> | 2015-06-23 13:40:09 +0000 |
commit | 28f5f0ce0be5529598124bbe5e0d72b0fd605e69 (patch) | |
tree | 50ba7d691efa59a0c45d740993c20c392bf4f94b /Mailman/Cgi/subscribe.py | |
parent | ab19a1505dd93eca5d9ca6792740c9eb56302cfe (diff) | |
download | mailman2-28f5f0ce0be5529598124bbe5e0d72b0fd605e69.tar.gz mailman2-28f5f0ce0be5529598124bbe5e0d72b0fd605e69.tar.xz mailman2-28f5f0ce0be5529598124bbe5e0d72b0fd605e69.zip |
Support for HTTP_X_FORWARDED_FOR and HTTP_FORWARDED_FOR (RFC 7239)
Diffstat (limited to 'Mailman/Cgi/subscribe.py')
-rwxr-xr-x | Mailman/Cgi/subscribe.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Mailman/Cgi/subscribe.py b/Mailman/Cgi/subscribe.py index fff21e98..ab5c7cd8 100755 --- a/Mailman/Cgi/subscribe.py +++ b/Mailman/Cgi/subscribe.py @@ -118,9 +118,10 @@ def process_form(mlist, doc, cgidata, lang): # Canonicalize the full name fullname = Utils.canonstr(fullname, lang) # Who was doing the subscribing? - remote = os.environ.get('REMOTE_HOST', - os.environ.get('REMOTE_ADDR', - 'unidentified origin')) + remote = os.environ.get('HTTP_FORWARDED_FOR', + os.environ.get('HTTP_X_FORWARDED_FOR', + os.environ.get('REMOTE_ADDR', + 'unidentified origin'))) # Are we checking the hidden data? if mm_cfg.SUBSCRIBE_FORM_SECRET: now = int(time.time()) |