Re: escaping and sql injection

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: escaping and sql injection
Дата
Msg-id 1045880032.366.10.camel@tokyo
обсуждение исходный текст
Ответ на Re: escaping and sql injection  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
On Fri, 2003-02-21 at 19:07, Martijn van Oosterhout wrote:
> You can solve the SQL injection problem by escaping all single quotes (')
> and blackslashes (\) with a backslash.

Rather than doing this by hand, I think it's probably wiser to let your
language interface do it for you. For example, libpq provides a
PQescapeString() function for escaping strings.

That particular function doesn't handle semi-colons, however.

Cheers,

Neil
--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC




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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: regexp question
Следующее
От: Tom Lane
Дата:
Сообщение: Re: A problem with sequences...