Re: security invoker review need full select (all columns) to do DML?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: security invoker review need full select (all columns) to do DML?
Дата
Msg-id 1777285.1724251184@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: security invoker review need full select (all columns) to do DML?  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Список pgsql-general
Dean Rasheed <dean.a.rasheed@gmail.com> writes:
> The user must have select permissions on all columns selected by the
> subquery/view, because we don't go through the outer query to check
> which columns are actually referred to. Now maybe we could, but I
> suspect that would be quite a lot of effort because you'd need to be
> sure that the column wasn't referred to anywhere in either the outer
> query or the subquery itself (e.g., in WHERE clauses, etc.).

I'd argue that we should check that permission regardless, and are
probably required to by the SQL spec.  You don't normally get to
escape permission checks when bits of the query are optimized away.
(This is why permission checks are done on the range table not the
plan tree.)

            regards, tom lane



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