View | Details | Raw Unified | Return to bug 225703
Collapse All | Expand All

(-)Mailman/Cgi/options.py (-15 / +17 lines)
Lines 1-4 Link Here
1
# Copyright (C) 1998-2011 by the Free Software Foundation, Inc.
1
# Copyright (C) 1998-2018 by the Free Software Foundation, Inc.
2
#
2
#
3
# This program is free software; you can redistribute it and/or
3
# This program is free software; you can redistribute it and/or
4
# modify it under the terms of the GNU General Public License
4
# modify it under the terms of the GNU General Public License
Lines 165-184 def main(): Link Here
165
    doc.set_language(userlang)
165
    doc.set_language(userlang)
166
    i18n.set_language(userlang)
166
    i18n.set_language(userlang)
167
167
168
    # See if this is VARHELP on topics.
169
    varhelp = None
170
    if cgidata.has_key('VARHELP'):
171
        varhelp = cgidata['VARHELP'].value
172
    elif os.environ.get('QUERY_STRING'):
173
        # POST methods, even if their actions have a query string, don't get
174
        # put into FieldStorage's keys :-(
175
        qs = cgi.parse_qs(os.environ['QUERY_STRING']).get('VARHELP')
176
        if qs and type(qs) == types.ListType:
177
            varhelp = qs[0]
178
    if varhelp:
179
        topic_details(mlist, doc, user, cpuser, userlang, varhelp)
180
        return
181
182
    # Are we processing an unsubscription request from the login screen?
168
    # Are we processing an unsubscription request from the login screen?
183
    if cgidata.has_key('login-unsub'):
169
    if cgidata.has_key('login-unsub'):
184
        # Because they can't supply a password for unsubscribing, we'll need
170
        # Because they can't supply a password for unsubscribing, we'll need
Lines 290-295 def main(): Link Here
290
        print doc.Format()
276
        print doc.Format()
291
        return
277
        return
292
278
279
    # See if this is VARHELP on topics.
280
    varhelp = None
281
    if cgidata.has_key('VARHELP'):
282
        varhelp = cgidata['VARHELP'].value
283
    elif os.environ.get('QUERY_STRING'):
284
        # POST methods, even if their actions have a query string, don't get
285
        # put into FieldStorage's keys :-(
286
        qs = cgi.parse_qs(os.environ['QUERY_STRING']).get('VARHELP')
287
        if qs and type(qs) == types.ListType:
288
            varhelp = qs[0]
289
    if varhelp:
290
        # Sanitize the topic name.
291
        varhelp = re.sub('<.*', '', varhelp)
292
        topic_details(mlist, doc, user, cpuser, userlang, varhelp)
293
        return
294
293
    if cgidata.has_key('logout'):
295
    if cgidata.has_key('logout'):
294
        print mlist.ZapCookie(mm_cfg.AuthUser, user)
296
        print mlist.ZapCookie(mm_cfg.AuthUser, user)
295
        loginpage(mlist, doc, user, language)
297
        loginpage(mlist, doc, user, language)

Return to bug 225703