Skip to content

Commit 289f937

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 (cherry picked from commit e69a2ad)
1 parent 0922c8a commit 289f937

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_series TO 'nobody'@localhost;
4646
GRANT INSERT, SELECT ON patchwork_seriesreference TO 'nobody'@localhost;
4747
GRANT INSERT, SELECT ON patchwork_submission 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
@@ -84,6 +84,7 @@ GRANT INSERT, SELECT, UPDATE, DELETE ON
8484
patchwork_series
8585
TO "nobody";
8686
GRANT SELECT ON
87+
auth_user,
8788
patchwork_delegationrule,
8889
patchwork_project,
8990
patchwork_state,

0 commit comments

Comments
 (0)