diff options
Diffstat (limited to 'src/mongo/db/auth/authorization_manager_impl.cpp')
-rw-r--r-- | src/mongo/db/auth/authorization_manager_impl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/auth/authorization_manager_impl.cpp b/src/mongo/db/auth/authorization_manager_impl.cpp index a733e5bf058..0f9f7ff2e47 100644 --- a/src/mongo/db/auth/authorization_manager_impl.cpp +++ b/src/mongo/db/auth/authorization_manager_impl.cpp @@ -138,7 +138,7 @@ public: Status set(const BSONElement& newValueElement) { if (newValueElement.type() == String) { - return setFromString(newValueElement.valuestrsafe()); + return setFromString(newValueElement.str()); } else if (newValueElement.type() == Array) { auto array = static_cast<BSONArray>(newValueElement.embeddedObject()); std::vector<UserName> out; @@ -244,7 +244,7 @@ bool loggedCommandOperatesOnAuthzData(const NamespaceString& nss, const BSONObj& return true; } else if (cmdName == "renameCollection") { const NamespaceString fromNamespace(cmdObj.firstElement().valueStringDataSafe()); - const NamespaceString toNamespace(cmdObj["to"].valueStringDataSafe()); + const NamespaceString toNamespace(cmdObj.getStringField("to")); if (fromNamespace.isAdminDB() || toNamespace.isAdminDB()) { return isAuthzCollection(fromNamespace.coll()) || isAuthzCollection(toNamespace.coll()); |