-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
Hi guys. I think I found a problem with the Footprinter.php file.
on the line 21 we have this function
public function footprint(Request $request): string
{
$this->request = $request;
if ($request->hasCookie(config('footprints.cookie_name'))) {
return $request->cookie(config('footprints.cookie_name'));
}
// This will add the cookie to the response
Cookie::queue(
config('footprints.cookie_name'),
$footprint = substr($this->fingerprint(), 0, 255),
config('footprints.attribution_duration'),
null,
config('footprints.cookie_domain')
);
return $footprint;
}
the problem is in the line 32 because laravel make a cookie encryptation and then the first request returns the value stored in the variable $footprint
but the second request returns the cookie value encrypted
my solution was to add the cookie name in the EncryptCookies middleware and so we prevent laravel from changing the value.
Metadata
Metadata
Assignees
Labels
No labels