← PHP / Laravel · Contents

PHP-052 / Intermediate

Sensitive operations through unsigned public URLs

A01:2021 Broken Access Control · CWE-345 Insufficient Verification of Data Authenticity

Why is this a problem?

Changing only parameters enables forged email-verification or invitation links.

How to fix it

php
Route::get('/verify/{id}', VerifyCtrl::class)->name('verify')->middleware('signed');
// Generate using URL::temporarySignedRoute(...)

Further reading