okawaffles / OkayuCDN

A File Upload Server based around Nekomata Okayu.
https://okayu.okawaffles.com
Other
2 stars 0 forks source link

Tokens are not cryptographically secure #14

Closed okawaffles closed 1 year ago

okawaffles commented 1 year ago

const genNewToken = size => [...Array(size)].map(() => Math.floor(Math.random() * 16).toString(16)).join(''); Math.random() should not be used for security. Instead, the node:crypto library should be used.