From: Dmitry Tkach <dmitry@openratings.com>
To: Kim Ho <kho@redhat.com>
Cc: Fernando Nasser <fnasser@redhat.com>
Cc: Barry Lind <blind@xythos.com>
Cc: pgsql-jdbc-list <pgsql-jdbc@postgresql.org>
Subject: Re: Prepared Statements
Date: Fri, 18 Jul 2003 13:53:39 -0400
Message-ID: <3F183423.9030900@openratings.com> (raw)
In-Reply-To: <1058550328.19657.168.camel@topanga.toronto.redhat.com>
References: <OFBD7C18F4.2499D62A-ON85256D66.005245AA@lexmark.com>
<3F174BFF.3070704@xyth os.com>
<3F1801C5.9030104@openratings.com>
<3F181A81.70208@xythos.com>
<3F18259C.6090503@redhat.com>
<1058548037.19658.159.camel@topanga.toronto.redhat.com>
<3F183004.4010508@openratings.com>
<3F1830F6.3020203@openratings.com>
<1058550328.19657.168.camel@topanga.toronto.redhat.com>
Kim Ho wrote:
>Can't you instead use setString(1, "x'a'")?
>
Nope - that will get converted into ... where id='x\'a\'' - that won't
be understood by the backend - it wants it *exactly* that way - x
outside the quotes, followed by a quoted hexademical number...
>
>If not, this also brings up another thing. Did you want to treat "x'a'"
>as a number now?
>
Yes, I did (and still do) :-)
>
>In any case, here is a revised version of the patch. =) Thanks for the
>pointers.
>
I must be missing something, but I don't see any difference with the
previous version ....
>
>Also, the remove radix thing is not meant for preventing SQL injection.
>It is meant for this like:
>
>create function integer_in(integer) ....
>
>and then using things like select integer_in(1.11231E9)
>
I understand that. I was just saying that adding quotes around the input
doesn't help much in preventing injections, but does take away valuable
functionality...
Dima
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: dmitry@openratings.com, kho@redhat.com, fnasser@redhat.com, blind@xythos.com
Subject: Re: Prepared Statements
In-Reply-To: <3F183423.9030900@openratings.com>
References: <OFBD7C18F4.2499D62A-ON85256D66.005245AA@lexmark.com> <3F1801C5.9030104@openratings.com> <3F181A81.70208@xythos.com> <3F18259C.6090503@redhat.com> <1058548037.19658.159.camel@topanga.toronto.redhat.com> <3F183004.4010508@openratings.com> <3F1830F6.3020203@openratings.com> <1058550328.19657.168.camel@topanga.toronto.redhat.com> <3F183423.9030900@openratings.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox