[issue12529] cgi.parse_header fails on double quotes and semicolons

2011-10-20 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset cfc545e028e0 by Senthil Kumaran in branch '3.2':
News entry for Issue12529 and Issue12604
http://hg.python.org/cpython/rev/cfc545e028e0

New changeset 52a4e899966c by Senthil Kumaran in branch 'default':
News entry for Issue12529 and Issue12604
http://hg.python.org/cpython/rev/52a4e899966c

New changeset 6f7ddbfafbb0 by Senthil Kumaran in branch '2.7':
News entry for Issue12529 and Issue12604
http://hg.python.org/cpython/rev/6f7ddbfafbb0

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12529
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12529] cgi.parse_header fails on double quotes and semicolons

2011-10-19 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 489237756488 by Senthil Kumaran in branch '2.7':
Fix closes Issue12529 - cgi.parse_header failure on double quotes and
http://hg.python.org/cpython/rev/489237756488

--
nosy: +python-dev
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12529
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12529] cgi.parse_header fails on double quotes and semicolons

2011-10-19 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset f5bd78b11275 by Senthil Kumaran in branch '3.2':
3.2 - Fix closes Issue12529 - cgi.parse_header failure on double quotes and
http://hg.python.org/cpython/rev/f5bd78b11275

New changeset 8564d2b240b6 by Senthil Kumaran in branch 'default':
default - Fix closes Issue12529 - cgi.parse_header failure on double quotes and
http://hg.python.org/cpython/rev/8564d2b240b6

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12529
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12529] cgi.parse_header fails on double quotes and semicolons

2011-10-19 Thread Senthil Kumaran

Senthil Kumaran sent...@uthcode.com added the comment:

Thanks for the patch, Petri and Ben.Darnell.

--
nosy: +orsenthil

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12529
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12529] cgi.parse_header fails on double quotes and semicolons

2011-07-15 Thread Petri Lehtinen

Petri Lehtinen pe...@digip.org added the comment:

Attached a patch against 2.7. It adds Ben's example as a test case, and his 
one-line change to the _parseparam helper function to fix the issue.

--
components: +Library (Lib)
keywords: +needs review, patch
nosy: +petri.lehtinen
stage:  - patch review
versions: +Python 2.7, Python 3.2
Added file: http://bugs.python.org/file22672/issue12529.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12529
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12529] cgi.parse_header fails on double quotes and semicolons

2011-07-10 Thread Ben Darnell

New submission from Ben Darnell ben.darn...@gmail.com:

cgi.parse_header doesn't work on headers that contain combinations of double 
quotes and semicolons (although it works with either type of character 
individually).  

 cgi.parse_header('form-data; name=files; filename=fo\\o;bar')
('form-data', {'name': 'files', 'filename': 'fo\\o'})

This issue is present in python 2.7 and 3.2.  One solution is to change 
_parseparam as follows (same as email.message._parseparam):

def _parseparam(s):
while s[:1] == ';':
s = s[1:]
end = s.find(';')
while end  0 and (s.count('', 0, end) - s.count('\\', 0, end)) % 2:
end = s.find(';', end + 1)
if end  0:
end = len(s)
f = s[:end]
yield f.strip()
s = s[end:]

--
messages: 140091
nosy: Ben.Darnell
priority: normal
severity: normal
status: open
title: cgi.parse_header fails on double quotes and semicolons

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12529
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12529] cgi.parse_header fails on double quotes and semicolons

2011-07-10 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

The email module header parser handles this correctly (if you make it a real 
header).  For whatever that's worth :)

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12529
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com