450467 Integer overflow in Session expiry calculation in MongoSessionManager
This commit is contained in:
parent
e0fbd6d9f2
commit
f10403b41a
|
@ -100,7 +100,7 @@ public abstract class NoSqlSessionManager extends AbstractSessionManager impleme
|
|||
__log.debug("session loaded ", idInCluster);
|
||||
|
||||
//check if the session we just loaded has actually expired, maybe while we weren't running
|
||||
if (getMaxInactiveInterval() > 0 && session.getAccessed() > 0 && ((getMaxInactiveInterval()*1000)+session.getAccessed()) < System.currentTimeMillis())
|
||||
if (getMaxInactiveInterval() > 0 && session.getAccessed() > 0 && ((getMaxInactiveInterval()*1000L)+session.getAccessed()) < System.currentTimeMillis())
|
||||
{
|
||||
__log.debug("session expired ", idInCluster);
|
||||
expire(idInCluster);
|
||||
|
|
|
@ -237,7 +237,7 @@ public class MongoSessionManager extends NoSqlSessionManager
|
|||
// handle valid or invalid
|
||||
if (session.isValid())
|
||||
{
|
||||
long expiry = (session.getMaxInactiveInterval() > 0?(session.getAccessed()+(1000*getMaxInactiveInterval())):0);
|
||||
long expiry = (session.getMaxInactiveInterval() > 0?(session.getAccessed()+(1000L*getMaxInactiveInterval())):0);
|
||||
__log.debug("MongoSessionManager: calculated expiry {} for session {}", expiry, session.getId());
|
||||
|
||||
// handle new or existing
|
||||
|
|
Loading…
Reference in New Issue