diff options
author | Andreas Nilsson <andreas.nilsson@10gen.com> | 2014-01-29 10:16:39 -0500 |
---|---|---|
committer | Andreas Nilsson <andreas.nilsson@10gen.com> | 2014-01-29 10:18:23 -0500 |
commit | 823a3e4929a62944e20ab808fc6324692d89ae68 (patch) | |
tree | 3e6bf609b777be975c3222be7c3430e80b30f55f /src/mongo/db/auth | |
parent | 4adca0065aff4bd10b317f6fd03cfbb71ae82204 (diff) | |
download | mongo-823a3e4929a62944e20ab808fc6324692d89ae68.tar.gz |
SERVER-12383 Add upper bound for userCacheInvalidationInterval
Diffstat (limited to 'src/mongo/db/auth')
-rw-r--r-- | src/mongo/db/auth/user_cache_invalidator_job.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/auth/user_cache_invalidator_job.cpp b/src/mongo/db/auth/user_cache_invalidator_job.cpp index 1562e05f465..64201da2be3 100644 --- a/src/mongo/db/auth/user_cache_invalidator_job.cpp +++ b/src/mongo/db/auth/user_cache_invalidator_job.cpp @@ -41,9 +41,10 @@ namespace { virtual Status validate( const int& potentialNewValue ) { - if (potentialNewValue < 30) { + if (potentialNewValue < 30 || potentialNewValue > 86400) { return Status(ErrorCodes::BadValue, - "userCacheInvalidationIntervalSecs must be at least 30"); + "userCacheInvalidationIntervalSecs must be between 30 " + "and 86400 (24 hours)"); } return Status::OK(); } |