Details
// Pages/Attribute/Browse.php
->groupedBulkActions([
DeleteBulkAction::make()
+ ->authorize('delete_attributes')
->label(__('shopper::forms.actions.delete'))
->requiresConfirmation()
->action(function (Collection $records): void { /* ... */ }),
BulkAction::make('enabled')
+ ->authorize('edit_attributes')
->label(__('shopper::forms.actions.enable'))
->action(function (Collection $records): void { /* ... */ }),
BulkAction::make('disabled')
+ ->authorize('edit_attributes')
->label(__('shopper::forms.actions.disable'))
->action(function (Collection $records): void { /* ... */ }),
])
Apply the equivalent change to Pages/Tag/Index.php (delete_tags), Pages/Brand/Index.php (edit_brands for enable/disable), Pages/Category/Index.php (edit_categories), and Pages/Supplier/Index.php (edit_suppliers).
A regression test for each file (acting as a browse_*-only user and expecting assertHasErrors/AuthorizationException) would lock in the fix, matching the regression tests added for #514.
Resources
- Prior advisories of the same class (read-only permission gating a write action): GHSA-f946-9qp6-vgch, GHSA-j328-xmgp-j4q3 / GHSA-vw82-3966-f9mr.
- Same-shape fix: commit
ac9a760(PR #514). Five Filament bulk-action groups did not receive the corresponding->authorize(...)chain. - CWE-285 Improper Authorization, CWE-862 Missing Authorization.
Credits
Reported by Vishal Shukla(@shukla304) using sechub.dev AI Agent
Support
If this disclosure was useful and userswould like to support continued open-source security research and responsible-disclosure work, they can sponsor at https://github.com/sponsors/therawdev — Shopper is thankful for those keeping open source safe.