mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-22 20:12:14 +00:00
Correct input validation for 31 rounds
Closes gh-11470
This commit is contained in:
parent
a7d21f1b34
commit
28424f8ae5
@ -543,7 +543,7 @@ public class BCrypt {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rounds = roundsForLogRounds(log_rounds);
|
rounds = roundsForLogRounds(log_rounds);
|
||||||
if (rounds < 16 || rounds > Integer.MAX_VALUE) {
|
if (rounds < 16 || rounds > 2147483648L) {
|
||||||
throw new IllegalArgumentException("Bad number of rounds");
|
throw new IllegalArgumentException("Bad number of rounds");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user