diff options
-rw-r--r-- | src/mongo/client/dbclient_base.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/client/dbclient_base.cpp b/src/mongo/client/dbclient_base.cpp index 149dedbd063..192d3c78dd8 100644 --- a/src/mongo/client/dbclient_base.cpp +++ b/src/mongo/client/dbclient_base.cpp @@ -433,7 +433,7 @@ bool DBClientBase::auth(const string& dbname, // To prevent unexpected behavior for existing clients, default to SCRAM-SHA-1 if the SASL // negotiation does not succeeed for some reason. - StringData mech = mechResult.isOK() ? mechResult.getValue() : "SCRAM-SHA-1"; + StringData mech = mechResult.isOK() ? mechResult.getValue() : "SCRAM-SHA-1"_sd; try { const auto authParams = auth::buildAuthParams(dbname, username, password_text, mech); |