← PHP / Laravel · Contents

PHP-078 / Intermediate

Publicly exposed Telescope or Horizon dashboards

A01:2021 Broken Access Control · CWE-284 Improper Access Control

Why is this a problem?

Requests, queues, exception contents and user information become externally visible.

How to fix it

php
Gate::define('viewTelescope', fn($user) => in_array($user->email, ['admin@example.com']));

Further reading