From 69a98a8465f910d58911456dfe840a7b829ccc65 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 13 Sep 2023 18:50:42 +0300 Subject: SL-20278 Disconnect saving MFA from saving password --- indra/newview/llstartup.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index ced6ffa32e..ad87fca25b 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -3795,7 +3795,9 @@ bool process_login_success_response() // Only save mfa_hash for future logins if the user wants their info remembered. - if(response.has("mfa_hash") && gSavedSettings.getBOOL("RememberUser") && gSavedSettings.getBOOL("RememberPassword")) + if(response.has("mfa_hash") + && gSavedSettings.getBOOL("RememberUser") + && LLLoginInstance::getInstance()->saveMFA()) { std::string grid(LLGridManager::getInstance()->getGridId()); std::string user_id(gUserCredential->userID()); @@ -3803,6 +3805,13 @@ bool process_login_success_response() // TODO(brad) - related to SL-17223 consider building a better interface that sync's automatically gSecAPIHandler->syncProtectedMap(); } + else if (!LLLoginInstance::getInstance()->saveMFA()) + { + std::string grid(LLGridManager::getInstance()->getGridId()); + std::string user_id(gUserCredential->userID()); + gSecAPIHandler->removeFromProtectedMap("mfa_hash", grid, user_id); + gSecAPIHandler->syncProtectedMap(); + } bool success = false; // JC: gesture loading done below, when we have an asset system -- cgit v1.2.3