소스 검색

Correct input validation for 31 rounds

Closes gh-11470
Josh Cummings 3 년 전
부모
커밋
28424f8ae5
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      crypto/src/main/java/org/springframework/security/crypto/bcrypt/BCrypt.java

+ 1 - 1
crypto/src/main/java/org/springframework/security/crypto/bcrypt/BCrypt.java

@@ -543,7 +543,7 @@ public class BCrypt {
 		}
 		else {
 			rounds = roundsForLogRounds(log_rounds);
-			if (rounds < 16 || rounds > Integer.MAX_VALUE) {
+			if (rounds < 16 || rounds > 2147483648L) {
 				throw new IllegalArgumentException("Bad number of rounds");
 			}
 		}