Page MenuHomePhabricator

Correct overbroad automatic capability grant of global settings objects
ClosedPublic

Authored by epriestley on May 9 2022, 10:10 PM.
Tags
None
Referenced Files
F13201177: D21811.diff
Tue, May 14, 8:54 AM
F13198290: D21811.diff
Mon, May 13, 5:38 AM
F13189201: D21811.id51988.diff
Sat, May 11, 5:47 AM
F13184754: D21811.id.diff
Fri, May 10, 11:28 PM
F13183240: D21811.diff
Fri, May 10, 7:45 AM
Unknown Object (File)
Sat, May 4, 10:59 AM
Unknown Object (File)
Sat, May 4, 1:01 AM
Unknown Object (File)
Fri, May 3, 2:16 PM
Subscribers
None

Details

Summary

Ref T13679. In D16983, global settings objects were given an exception to let logged-out users see them, even on installs with no "public" user role.

This exception is too broad and grants everyone all capabilities, not just "CAN_VIEW". In particular, it incorrectly grants "CAN_EDIT", so any user can edit global settings defaults.

Restrict this grant to "CAN_VIEW".

Test Plan
  • As a non-administrator, tried to edit global settings.
  • Before: could.
  • After: could not.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable