Re: (security) Rules of thumb for escaping user input?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: (security) Rules of thumb for escaping user input?
Дата
Msg-id 8638.1021476356@sss.pgh.pa.us
обсуждение исходный текст
Ответ на (security) Rules of thumb for escaping user input?  (Bill Gribble <grib@linuxdevel.com>)
Список pgsql-general
Bill Gribble <grib@linuxdevel.com> writes:
> So the only escaping I do in my app currently is to replace ' with '' in
> user-input strings.  If I assume that the goal is to prevent any
> user-input strings from being evaluated as SQL statements (only to allow
> user input as constant values), what other escaping do I need to do?

In PG you also need to double backslashes.  That's it --- there are no
other special characters in string literals.

            regards, tom lane

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

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: Is it better to use OS cache or max out memory usage of PostgreSQL?
Следующее
От: Andy DePue
Дата:
Сообщение: Re: Spped of max