PHP-007 / Beginner
IDOR: missing resource ownership checks
Why is this a problem?
Changing only an ID grants access to other users' orders or documents.
How to fix it
php
public function show(Order $order) {
$this->authorize('view', $order); // Compare user_id in the policy
return $order;
}