Fix MongoExpiringSession.isExpired interval < 0
Verify that interval is non-negative, as negative values for maxInactiveInterval disables expiration. Issue gh-629
This commit is contained in:
@@ -116,7 +116,7 @@ public class MongoExpiringSession implements ExpiringSession {
|
||||
}
|
||||
|
||||
public boolean isExpired() {
|
||||
return new Date().after(this.expireAt);
|
||||
return this.interval >= 0 && new Date().after(this.expireAt);
|
||||
}
|
||||
|
||||
public Date getExpireAt() {
|
||||
|
||||
Reference in New Issue
Block a user