The getToken() function uses the PHP shuffle() function.

The PHP documention on shuffle() specifies the following:
"It uses a pseudo random number generator that is not suitable for cryptographic purposes."
This is because shuffle() is implemented using the C rand() function.

It would be safer to generate the tokens using a native Drupal function like drupal_random_bytes https://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/drup...

This should be fixed for 6.x 7.x and 8.x

Comments

Sam Hermans created an issue. See original summary.

sam hermans’s picture

Issue summary: View changes
sam hermans’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.