Re: Patch applied for SQL Injection vulnerability for setObject(int,Object,int)

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: Patch applied for SQL Injection vulnerability for setObject(int,Object,int)
Дата
Msg-id 20030722133909.GD11354@opencloud.com
обсуждение исходный текст
Ответ на Re: Prepared Statements  (wsheldah@lexmark.com)
Список pgsql-jdbc
On Tue, Jul 22, 2003 at 09:33:53AM -0400, Tom Lane wrote:
> Oliver Jowett <oliver@opencloud.com> writes:
> > ... won't this break code that does something like this? :
>
> >   stmt = conn.prepareStatement("SELECT * FROM table WHERE string_key IN ?");
> >   stmt.setObject(1, "('a', 'b', 'c')", Types.NUMERIC);
>
> Code that does that is just going to have to break.  We should try to
> provide equivalent functionality in a less unsafe fashion; but
> backwards compatibility with code that is exploiting a security hole
> is not an option.

I agree; since we can't remain backwards-compatible in all cases, is it
worth doing the odd halfway-escaped thing for the sake of the remaining
cases?

-O

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

Предыдущее
От: Paul Thomas
Дата:
Сообщение: Re: IN clauses via setObject(Collection) [Was: Re: Prepared
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Patch applied for SQL Injection vulnerability for setObject(int,Object,int)