[pgAdmin III] #315: Properties dialogue: REVOKE goes wrong in certain cases.

From: "pgAdmin Trac" <trac(at)code(dot)pgadmin(dot)org>
To:
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: [pgAdmin III] #315: Properties dialogue: REVOKE goes wrong in certain cases.
Date: 2011-04-21 14:30:13
Message-ID: 045.c404002ca2037ce1686de2b44ffb0969@code.pgadmin.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

#315: Properties dialogue: REVOKE goes wrong in certain cases.
---------------------+------------------------------------------------------
Reporter: brsa | Owner: dpage
Type: bug | Status: new
Priority: major | Milestone:
Component: pgadmin | Version: trunk
Keywords: | Platform: windows
---------------------+------------------------------------------------------
Testcase to reproduce - execute as superuser postgres:

CREATE ROLE blob;
CREATE ROLE blob_read;
CREATE TABLE test (t integer PRIMARY KEY);
GRANT SELECT ON TABLE test TO blob_read; -- note the underscore!
GRANT SELECT ON TABLE test TO blob; -- note how this role's name is
identical up to the underscore! Note also, that this GRANT comes after the
one before.

Open properties dialog on table, chose "Privileges" rider.
You see 3 users that have privileges:
postgres arwdDxt
blob_read r
blob r

Now try to delete "blob_read". (mark, click [Remove], click [OK]).
!The wrong role gets deleted!

Actually, that is what the server gets. All 3 commands are wrong /
nonsensical!
REVOKE ALL ON TABLE test FROM GROUP blob;
GRANT SELECT ON TABLE test TO GROUP blob;
REVOKE ALL ON TABLE test FROM GROUP blob;

The bug only occurs if blob_read appears before blob in the list of
privileges.
I have tried to pin down this one for a while now, but it was extremely
hard to pin down. Present in 1.12.2 as well as 1.12.3 (pre-release).

Maybe underscores in role-names confuse the algorithm .. ?

--
Ticket URL: <http://code.pgadmin.org/trac/ticket/315>
pgAdmin III <http://code.pgadmin.org/trac/>
pgAdmin III

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Erwin Brandstetter 2011-04-21 14:34:16 Properties dialogue: REVOKE goes wrong in certain cases.
Previous Message Dave Page 2011-04-21 13:42:29 Re: 1.12.3 built