Message21037
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__
|
|
Date |
User |
Action |
Args |
2007-08-23 14:22:09 | admin | link | issue966992 messages |
2007-08-23 14:22:09 | admin | create | |
|