Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 48f4b6c

Browse files
Apply suggestions from code review
Co-authored-by: Felicity Chapman <[email protected]>
1 parent 895f4d0 commit 48f4b6c

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

java/ql/src/Security/CWE/CWE-338/JHipsterGeneratedPRNGVulnerable.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ private RandomUtil() {
1616
* @return the generated password.
1717
*/
1818
public static String generatePassword() {
19-
return RandomStringUtils.randomAlphanumeric(DEF_COUNT); // BAD: RandomStringUtils oes not use SecureRandom
19+
return RandomStringUtils.randomAlphanumeric(DEF_COUNT); // BAD: RandomStringUtils does not use SecureRandom
2020
}
2121

2222
/**
@@ -25,7 +25,7 @@ public static String generatePassword() {
2525
* @return the generated activation key.
2626
*/
2727
public static String generateActivationKey() {
28-
return RandomStringUtils.randomNumeric(DEF_COUNT); // BAD: RandomStringUtils oes not use SecureRandom
28+
return RandomStringUtils.randomNumeric(DEF_COUNT); // BAD: RandomStringUtils does not use SecureRandom
2929
}
3030

3131
/**
@@ -34,7 +34,7 @@ public static String generateActivationKey() {
3434
* @return the generated reset key.
3535
*/
3636
public static String generateResetKey() {
37-
return RandomStringUtils.randomNumeric(DEF_COUNT); // BAD: RandomStringUtils oes not use SecureRandom
37+
return RandomStringUtils.randomNumeric(DEF_COUNT); // BAD: RandomStringUtils does not use SecureRandom
3838
}
3939

4040
/**
@@ -44,7 +44,7 @@ public static String generateResetKey() {
4444
* @return the generated series data.
4545
*/
4646
public static String generateSeriesData() {
47-
return RandomStringUtils.randomAlphanumeric(DEF_COUNT); // BAD: RandomStringUtils oes not use SecureRandom
47+
return RandomStringUtils.randomAlphanumeric(DEF_COUNT); // BAD: RandomStringUtils does not use SecureRandom
4848
}
4949

5050
/**
@@ -53,6 +53,6 @@ public static String generateSeriesData() {
5353
* @return the generated token data.
5454
*/
5555
public static String generateTokenData() {
56-
return RandomStringUtils.randomAlphanumeric(DEF_COUNT); // BAD: RandomStringUtils oes not use SecureRandom
56+
return RandomStringUtils.randomAlphanumeric(DEF_COUNT); // BAD: RandomStringUtils does not use SecureRandom
5757
}
5858
}

0 commit comments

Comments
 (0)