PHP-079 / Intermediate
Arbitrary file exposure through symlink following (public storage link)
Why is this a problem?
A symlink created in the upload directory can point to /etc.
How to fix it
php
$real = realpath($path);
abort_unless($real && str_starts_with($real, realpath(storage_path('app/uploads'))), 404);