PHP-029 / Intermediate
Trusting client-supplied role values
Why is this a problem?
Privileges are obtained by tampering with role values in hidden fields or cookies.
How to fix it
php
if ($request->user()->can('manage-users')) { return $this->adminPanel(); } // Server-side policy