You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This uses JavaScript's Math.random which is not a cryptographically secure random number generator. Therefore the generated numbers are not totally random, and predictable.
This uses JavaScript's
Math.random
which is not a cryptographically secure random number generator. Therefore the generated numbers are not totally random, and predictable.passgen/utils/createPassword.js
Line 15 in b42db1c
This means the generated passwords can be predicted. Using this to generate passwords is a huge security flaw.
A quick fix would be to use
crypto.randomBytes(number)
from node'scrypto
module, orCrypto.getRandomValues()
in a (relatively modern) browser.Edit:
Crypto.getRandomValues()
seems to be implemented in node 15.0.0+, so it should be a universal solution for node 15+ and browsersThe text was updated successfully, but these errors were encountered: