Files
codeql/javascript/ql/src/Security/CWE-338/examples/InsecureRandomness.js
2018-08-02 17:53:23 +01:00

7 lines
189 B
JavaScript

function insecurePassword() {
// BAD: the random suffix is not cryptographically secure
var suffix = Math.random();
var password = "myPassword" + suffix;
return password;
}