Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Bartel2014-11-12 05:26:14 +0000
committerJan Bartel2014-11-12 05:26:14 +0000
commitf10403b41a54df5b8e0d9e92dcb93b23d2a2c4da (patch)
tree7748436059bb582a6d0b3a5c4e06dd6041030ee2 /jetty-nosql
parente0fbd6d9f2833ab715152a72ed88b69be6bc6f94 (diff)
downloadorg.eclipse.jetty.project-f10403b41a54df5b8e0d9e92dcb93b23d2a2c4da.tar.gz
org.eclipse.jetty.project-f10403b41a54df5b8e0d9e92dcb93b23d2a2c4da.tar.xz
org.eclipse.jetty.project-f10403b41a54df5b8e0d9e92dcb93b23d2a2c4da.zip
450467 Integer overflow in Session expiry calculation in MongoSessionManager
Diffstat (limited to 'jetty-nosql')
-rw-r--r--jetty-nosql/src/main/java/org/eclipse/jetty/nosql/NoSqlSessionManager.java2
-rw-r--r--jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionManager.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/NoSqlSessionManager.java b/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/NoSqlSessionManager.java
index 606bc0dc80..37187cb5cc 100644
--- a/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/NoSqlSessionManager.java
+++ b/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/NoSqlSessionManager.java
@@ -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);
diff --git a/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionManager.java b/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionManager.java
index 9e5bba5d4e..48fd1c2f00 100644
--- a/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionManager.java
+++ b/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionManager.java
@@ -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

Back to the top