diff options
author | Robert Guo <robert.guo@10gen.com> | 2016-03-22 17:10:50 -0400 |
---|---|---|
committer | Robert Guo <robert.guo@10gen.com> | 2016-03-29 13:08:43 -0400 |
commit | e242b49373f0a9ee39f2b02f1a766a84c2c869b6 (patch) | |
tree | 3eaf08b0a85cbfde4b041f944001232d5e55e6e6 /src/mongo/db/ops/insert.cpp | |
parent | ea07e34466f14b127ac97f58ec6a40e9e52ebbd5 (diff) | |
download | mongo-e242b49373f0a9ee39f2b02f1a766a84c2c869b6.tar.gz |
SERVER-22577 disallow creation of databases containing $ on mmapv1
Diffstat (limited to 'src/mongo/db/ops/insert.cpp')
-rw-r--r-- | src/mongo/db/ops/insert.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/ops/insert.cpp b/src/mongo/db/ops/insert.cpp index 23d3d1bacce..7086d79707d 100644 --- a/src/mongo/db/ops/insert.cpp +++ b/src/mongo/db/ops/insert.cpp @@ -151,7 +151,7 @@ Status userAllowedCreateNS(StringData db, StringData coll) { if (db.size() == 0) return Status(ErrorCodes::BadValue, "db cannot be blank"); - if (!NamespaceString::validDBName(db)) + if (!NamespaceString::validDBName(db, NamespaceString::DollarInDbNameBehavior::Allow)) return Status(ErrorCodes::BadValue, "invalid db name"); if (coll.size() == 0) |