mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
FlashMap.startExpirationPeriod(int) and MockMvcWebConnection's cookie handling both multiplied an int number of seconds by 1000 without widening to long. Above 2_147_483 seconds (about 24.9 days) the multiplication overflows to a negative offset, so the computed expiration time lands in the past. For FlashMap, a flash map configured through AbstractFlashMapManager.setFlashMapTimeout(int) with a large timeout is then treated as expired immediately. For MockMvcWebConnection, a cookie with a large max-age is removed from the CookieManager instead of being stored. This applies the same widening already used for this pattern in gh-25613. Closes gh-37208 Signed-off-by: kogun <akogun@gmail.com>