mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-20 19:16:08 +00:00
2983971c8b
The privileged-role check looked only at the role's own rolsuper and at pg_execute_server_program and pg_write_server_files. A role that is no superuser itself but a member of one passed it and could SET ROLE to the superuser from a crafted archive; on PostgreSQL 14 and 15 a role with CREATEROLE could grant itself pg_execute_server_program; and pg_read_server_files let COPY read the server's files into TREK's tables. The check now counts membership in any superuser role, the three predefined server roles, and CREATEROLE before 16. The boot warning and the restore refusal describe the same list from one constant. A Postgres lane suite creates each kind of role and evaluates the check as it, and shows on the server it runs against whether CREATEROLE can grant itself pg_execute_server_program.