473,416 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

cgi, parse_header and semi-colon

Hi,

I'm playing with Google App Engine and during my tests it seems that
there is a bug in cgi. parse_header function.

If we upload a file with a semi-colon (i.e : "C:/my;file.jpg") :
cgi.FieldStorage.filename returns only "my" everything after the semi-
colon is missing

Is it a bug or i'm missing something ?

Regards
Jun 27 '08 #1
3 2624

"Sylvain" <sy************@gmail.comwrote in message
news:b8**********************************@25g2000h sx.googlegroups.com...
If we upload a file with a semi-colon (i.e : "C:/my;file.jpg") :
cgi.FieldStorage.filename returns only "my" everything after the semi-
colon is missing

Is it a bug or i'm missing something ?
I doubt it's bug in parse_header, since it's meant to split on
semicolons. Whether it's a bug in one of its callers, or the client
not escaping sufficiently, I couldn't say offhand.
Jun 27 '08 #2
On Jun 6, 5:33 pm, "Richard Brodie" <R.Bro...@rl.ac.ukwrote:
"Sylvain" <sylvain.viv...@gmail.comwrote in message

news:b8**********************************@25g2000h sx.googlegroups.com...
If we upload a file with a semi-colon (i.e : "C:/my;file.jpg") :
cgi.FieldStorage.filename returns only "my" everything after the semi-
colon is missing
Is it a bug or i'm missing something ?

I doubt it's bug inparse_header, since it's meant to split on
semicolons. Whether it's a bug in one of its callers, or the client
not escaping sufficiently, I couldn't say offhand.
I've printed the filename in the content-disposition header :
filename="my;file.jpg"

If you look at the http://www.ietf.org/rfc/rfc2183.txt about "content-
disposition" :

"A short parameter value containing only ASCII characters, but
including `tspecials' characters, SHOULD be represented as `quoted-
string'."

So my header is correct but i think there is clearly a bug in the
parse_header and "content-disposition" should not be "splitted" only
with the split(';') method but should look at quoted-string too.

Regards
Jun 27 '08 #3
En Sat, 07 Jun 2008 04:49:41 -0300, Sylvain <sy************@gmail.com>
escribió:
If we upload a file with a semi-colon (i.e : "C:/my;file.jpg") :
cgi.FieldStorage.filename returns only "my" everything after the semi-
colon is missing
It's a known bug: http://bugs.python.org/issue1540529 - the patch is
waiting for review...

--
Gabriel Genellina

Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Andrey Krivda 232973226 | last post by:
Hi! Whether there is an example where is used "Left Anti Semi Join"? andrey@tic.com.ua
7
by: jhomp ssens | last post by:
I would like to create a pulldown menu which is semi-transparent....that is, you can see the text and graphics behind it when it is pulled down. The effect I'm looking for can be seen at...
16
by: Kiuhnm | last post by:
Is there an elegant way to deal with semi-circular definitions? Semi-circular definition: A { B }; B { *A }; Circular reference: A { *B }; B { *A }; The problems arise when there are more...
2
by: David Scemama | last post by:
Hi, I'm looking for a way to display semi graphic characters in a multi line text control or in a rich text control. I've tried with all the characters of the extended ASCII table (code page...
2
by: Trond Michelsen | last post by:
Hi. I have a transparent PNG-image that I would like to display on top of the rest of the web page. I've already got this part working. But, I'd like the background (as in "the part of the image...
2
by: James Stroud | last post by:
Hello All, I am trying to create a semi-standalone with the vendor python on OS X 10.4 (python 2.3.5). I tried to include some packages with both --packages from the command and the 'packages'...
0
by: James Arnold | last post by:
I am trying to use a semi transparent PNG as the form background, allowing you to see through certain parts. The intention is similar to a skinnable form like launchy, with semi-transparent pixels...
9
by: JamesF1982 | last post by:
Hey everyone, My question is related to HTML, Javascript, CSS and ASP.NET but i think it belongs here! Upon an event i am trying to add a semi-transparent colour across the page so the...
26
by: machineghost | last post by:
First off, let me just say that as someone with no DBA training whatsoever, any help I can get with this issue will be very, very much appreciated. My company recently migrated our database from...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.