INSERT possible without INSERT-permission

Поиск
Список
Период
Сортировка
От pgsql-bugs@postgresql.org
Тема INSERT possible without INSERT-permission
Дата
Msg-id 200010151917.e9FJHdL65249@hub.hub.org
обсуждение исходный текст
Список pgsql-bugs
Gert Pache (uhx2@rz.uni-karlsruhe.de) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
INSERT possible without INSERT-permission

Long Description
Although a user without has only UPDATE/DELETE-permissions on a table he can insert into the table.

Version: 7.0.1

Sample Code
-- superuser creates tables tab und grants user pgtester only
-- update-permission

delme=# create table tab ( id int );
CREATE
delme=# revoke all on tab from public;
CHANGE
delme=# grant update on tab to pgtester;
CHANGE
delme=# \dp tab
Access permissions for database "delme"
 Relation | Access permissions
----------+--------------------
 tab      | {"=","pgtester=w"}


-- although not having insert permission, pgtester is able
-- to insert a record
delme=> insert into tab values (1);
INSERT 76448 1
-- SELECTs are forbidden as they should be
delme=> select * from tab;
ERROR:  tab: Permission denied.



No file was uploaded with this report

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: reproducable command sequence to get "mdopen: Couldn't open..."
Следующее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: permission-error in tables with referential integrity