| От | Phillip Diffley |
|---|---|
| Тема | Re: Stably escaping an identifier |
| Дата | |
| Msg-id | CAGAwPgSOdaZo7G0q7+mbRRQzbccBiMTAXvL-devxpGvS0PmkRQ@mail.gmail.com обсуждение |
| Ответ на | Re: Stably escaping an identifier (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-general |
Phillip Diffley <phillip6402@gmail.com> writes:
> Is there a reliable way to determine if an identifier has already been
> escaped, or alternatively is there a function that will stably escape an
> identifier such that the identifier will not change if the function is
> called repeatedly?
This is impossible in general, because you can't know if the
double-quotes are meant to be part of the identifier value.
My advice here would be to flat-out reject input identifiers that
contain double quotes. I'd suggest banning newlines too while
at it, as those are known to create security issues in some
contexts.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера