Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #73614
| From | Peter Otten <__peter__@web.de> |
|---|---|
| Subject | Re: protect psycopg script from sql injection? |
| Date | 2014-06-26 11:49 +0200 |
| Organization | None |
| References | <CAHByMH0PZKRrie3co9JSUhfr-VufCxO-Jy1K42tAjGvt2mifYg@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.11255.1403776190.18130.python-list@python.org> (permalink) |
celati Laurent wrote:
> I coded this following python script via psycopg;
>
> web_service_test.py
> <http://python.6.x6.nabble.com/file/n5062113/web_service_test.py>
>
> 1/ When i execute it, the result is 'bad resquest'. Could you tell me why?
No, but you might find out yourself. When you remove the overly broad
try:
... # code that may fail
except:
print "Bad request"
and just keep the code in the try suite
... # code that may fail
Python will produce an informative traceback. In the (unlikely) case that
with that extra information you still cannot find the problem in your code
come back here and post the complete traceback.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: protect psycopg script from sql injection? Peter Otten <__peter__@web.de> - 2014-06-26 11:49 +0200
csiph-web