EFForg / starttls-backend

STARTTLS Everywhere web backend and checker
https://starttls-everywhere.org/
Other
18 stars 6 forks source link

Use crypto/rand in place of math/rand for token generation #257

Open rubicae opened 4 years ago

rubicae commented 4 years ago

While familiarizing myself with the code, I found that the the token generation function was using math/rand (docs for math/rand) which states For random numbers suitable for security-sensitive work, see the crypto/rand package.

Accordingly, I have switched the token generation to use crypto/rand.