Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How secure is a Laravel signed route?

Tags:

laravel

In my application, i generate purchase orders. To avoid send the pdf by mail, I'm sending a signed route link.

How secure is this link? Is there a possibility, that someone can hack it?

like image 970
Peter Avatar asked Nov 01 '25 05:11

Peter


1 Answers

Laravel signed route, is reliant on a signature hash done with the hmac sha256 approach.

UrlGenerator.php in Laravel has this code that generates it.

return $this->route($name, $parameters + [
    'signature' => hash_hmac('sha256', $this->route($name, $parameters, $absolute), $key),
], $absolute);

This is as far as i know considered secure, related crypto stack site post. As long as your application key remains uncompromised, which it should.

like image 78
mrhn Avatar answered Nov 03 '25 10:11

mrhn



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!