Re: Prepared Statements

Поиск
Список
Период
Сортировка
От Dmitry Tkach
Тема Re: Prepared Statements
Дата
Msg-id 3F183423.9030900@openratings.com
обсуждение исходный текст
Ответ на Re: Prepared Statements  (Kim Ho <kho@redhat.com>)
Ответы Re: Prepared Statements  (Kim Ho <kho@redhat.com>)
Re: Prepared Statements  (Felipe Schnack <felipes@ritterdosreis.br>)
Список pgsql-jdbc
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



В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kim Ho
Дата:
Сообщение: Re: Prepared Statements
Следующее
От: Kim Ho
Дата:
Сообщение: Re: Prepared Statements