Re: CREATE CONSTRAINT TRIGGER appears to be a security hole
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: CREATE CONSTRAINT TRIGGER appears to be a security hole |
| Дата | |
| Msg-id | 9671.1029346491@sss.pgh.pa.us обсуждение |
| Ответ на | CREATE CONSTRAINT TRIGGER appears to be a security hole (Peter Eisentraut <peter_e@gmx.net>) |
| Список | pgsql-hackers |
Peter Eisentraut <peter_e@gmx.net> writes:
> While the REFERENCES privilege controls who can create foreign keys
> referring to one's tables, it seems you can evade it by using CREATE
> CONSTRAINT TRIGGER directly.
Good point.
> It seems we need to check the privilege on the table mentioned in the FROM
> "foo" clause as well. Is that correct and sufficient?
It is if we assume that every CREATE CONSTRAINT TRIGGER is used for
something that should require REFERENCES privilege. Given that the
command is not really intended for user use anyway, this is probably
okay to assume.
One might try to evade the check by mentioning something different in
FROM than is mentioned in the trigger arguments, but as of CVS tip
that doesn't work --- the RI triggers don't look at the relation-name
arguments anymore, only at the FROM link.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера