summaryrefslogtreecommitdiff
path: root/src/mongo/db/auth
diff options
context:
space:
mode:
authorAndreas Nilsson <andreas.nilsson@10gen.com>2014-01-29 10:16:39 -0500
committerAndreas Nilsson <andreas.nilsson@10gen.com>2014-01-29 10:18:23 -0500
commit823a3e4929a62944e20ab808fc6324692d89ae68 (patch)
tree3e6bf609b777be975c3222be7c3430e80b30f55f /src/mongo/db/auth
parent4adca0065aff4bd10b317f6fd03cfbb71ae82204 (diff)
downloadmongo-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.cpp5
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();
}