Weird cgi error
Steve Holden
steve at holdenweb.com
Mon Feb 25 13:12:02 EST 2008
Jesse Aldridge wrote:
> I uploaded the following script, called "test.py", to my webhost.
> It works find except when I input the string "python ". Note that's
> the word "python" followed by a space. If I submit that I get a 403
> error. It seems to work fine with any other string.
> What's going on here?
>
> Here's the script in action: http://crookedgames.com/cgi-bin/test.py
>
> Here's the code:
>
> #!/usr/bin/python
> print "Content-Type: text/html\n"
> print """
> <html>
> <body>
> <form action="test.py" method="post">
> <textarea name="data">
> </textarea>
> <INPUT type="submit" value="Submit">
> </form>
> </body>
> </html>
> """
This is some kind of crooked game, right? Your code works fine on a
local server, and there's no reason why it shouldn't work just fine on
yours either. All you are changing is the standard input to the process.
Since you claim to have spotted this specific error, perhaps you'd like
to explain just exactly how you came across it. I mean that's a pretty
specific input to test with ...
Frankly I am not sure you are telling the truth about the code behind
that page. If you *are* then you'd better provide specifics: Python
version, Apache version, httpd.conf file, and so on. April 1 is still
over a month away.
regards
Steve
PS: consider closing the <textarea> tag on the same line as the opening
tag to avoid spurious spaces in your pristine form.
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
More information about the Python-list
mailing list