Skip to content

Commit 0931874

Browse files
committed
do not use uniqid() for generating dev tool tokens
1 parent 41a78cb commit 0931874

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

EventListener/ConsoleProfilerListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function initialize(ConsoleCommandEvent $event): void
7777
return;
7878
}
7979

80-
$request->attributes->set('_stopwatch_token', substr(hash('xxh128', uniqid(mt_rand(), true)), 0, 6));
80+
$request->attributes->set('_stopwatch_token', bin2hex(random_bytes(3)));
8181
$this->stopwatch->openSection();
8282
}
8383

0 commit comments

Comments
 (0)