This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rgbecker
Recipients
Date 2004-06-05.08:59:28
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Under certain circumstances cgitb.scanvars fails with
because of an unititialized value variable. This bug is
present in 2.3.3 and 2.4a0.

The following script demonstrates
#####start
import cgitb;cgitb.enable()

def err(L):
    if 'never' in L:
        return
    if 1: print \
    '\n'.join(L)
    v=2

err(['',None])
#####finish

when run this results in mangled output because scanvars
attempts to evaluate '\n'.join(L) where L=['',None]. A
fix is to set value=__UNDEF__ at the start of scanvars.

Index: cgitb.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/cgitb.py,v
retrieving revision 1.11
diff -r1.11 cgitb.py
63c63
<     vars, lasttoken, parent, prefix = [], None, None, ''
---
>     vars, lasttoken, parent, prefix, value = [],
None, None, '', __UNDEF__
History
Date User Action Args
2007-08-23 14:22:09adminlinkissue966992 messages
2007-08-23 14:22:09admincreate