mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-10-15 18:54:54 +08:00
Merge pull request #656 from fooooxxxx/fix/timeout-integer-overflow
修复 SaLoginModel 的 timeout 超出整型范围时返回负数导致 Cookie 被设置为 会话期Cookie 的问题
This commit is contained in:
@@ -300,6 +300,9 @@ public class SaLoginModel {
|
||||
if(getTimeoutOrGlobalConfig() == SaTokenDao.NEVER_EXPIRE) {
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
if (timeout > Integer.MAX_VALUE) {
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
return (int)(long)timeout;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user