Ticket #315 (closed bug: fixed)

Opened 2 years ago

Last modified 18 months ago

Properties dialogue: REVOKE goes wrong in certain cases.

Reported by: brsa Owned by: gleu
Priority: major Milestone: 1.14
Component: pgadmin Version: 1.12
Keywords: Cc:
Platform: windows

Description

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 .. ?

Change History

Changed 2 years ago by gleu

  • owner changed from dpage to gleu
  • status changed from new to assigned

Changed 2 years ago by gleu

  • status changed from assigned to closed
  • version changed from trunk to 1.12
  • resolution set to fixed
  • milestone set to 1.12.4

Changed 18 months ago by gleu

  • milestone changed from 1.12.4 to 1.14

Milestone 1.12.4 deleted

Note: See TracTickets for help on using tickets.