Skip to content

Commit e69a2ad

Browse files
committed
lib: Grant SELECT on auth_user
If a mail arrives with the 'X-Patchwork-Delegate' hint header, the 'patchwork.parser' script will need to index the users table to find the appropriate user. This should be okay from a security perspective since passwords are hashed and salted and the rest of the information is mostly accessible publicly via the web UI and REST API. Signed-off-by: Stephen Finucane <[email protected]> Suggested-by: Ali Alnubani <[email protected]> Closes: #365
1 parent 2fdc889 commit e69a2ad

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

lib/sql/grant-all.mysql.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ GRANT INSERT, SELECT ON patchwork_person TO 'nobody'@localhost;
4646
GRANT INSERT, SELECT ON patchwork_series TO 'nobody'@localhost;
4747
GRANT INSERT, SELECT ON patchwork_seriesreference TO 'nobody'@localhost;
4848
GRANT INSERT, SELECT, UPDATE, DELETE ON patchwork_patchtag TO 'nobody'@localhost;
49+
GRANT SELECT ON auth_user TO 'nobody'@localhost;
4950
GRANT SELECT ON patchwork_delegationrule TO 'nobody'@localhost;
5051
GRANT SELECT ON patchwork_project TO 'nobody'@localhost;
5152
GRANT SELECT ON patchwork_state TO 'nobody'@localhost;

lib/sql/grant-all.postgres.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ GRANT INSERT, SELECT, UPDATE, DELETE ON
8585
patchwork_series
8686
TO "nobody";
8787
GRANT SELECT ON
88+
auth_user,
8889
patchwork_delegationrule,
8990
patchwork_project,
9091
patchwork_state,

0 commit comments

Comments
 (0)