summaryrefslogtreecommitdiff
path: root/indra/newview/lllogininstance.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2025-05-28 11:36:40 -0400
committerGitHub <noreply@github.com>2025-05-28 11:36:40 -0400
commitde8275b14b30bf754cdba1da867cb2e6c2783639 (patch)
tree77022d8d0348d5e99f54966193746fb1472d7ce2 /indra/newview/lllogininstance.cpp
parentcf2b4dbfb280986cf859b12fd55158d7b9e0ac3d (diff)
parentfe55c7815cde70c046467edfb651659af056cefc (diff)
Merge pull request #3861 from secondlife/release/2025.04
Release/2025.04
Diffstat (limited to 'indra/newview/lllogininstance.cpp')
-rw-r--r--indra/newview/lllogininstance.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index cbc3744aa3..4bffe7feac 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -329,6 +329,15 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
LL_DEBUGS("LLLogin") << "reason " << reason_response
<< " message " << message_response
<< LL_ENDL;
+
+ if (response.has("mfa_hash"))
+ {
+ mRequestData["params"]["mfa_hash"] = response["mfa_hash"];
+ mRequestData["params"]["token"] = "";
+
+ saveMFAHash(response);
+ }
+
// For the cases of critical message or TOS agreement,
// start the TOS dialog. The dialog response will be handled
// by the LLLoginInstance::handleTOSResponse() callback.
@@ -593,6 +602,24 @@ bool LLLoginInstance::handleMFAChallenge(LLSD const & notif, LLSD const & respon
return true;
}
+void LLLoginInstance::saveMFAHash(LLSD const& response)
+{
+ std::string grid(LLGridManager::getInstance()->getGridId());
+ std::string user_id(LLStartUp::getUserId());
+
+ // Only save mfa_hash for future logins if the user wants their info remembered.
+ if (response.has("mfa_hash") && gSavedSettings.getBOOL("RememberUser") && LLLoginInstance::getInstance()->saveMFA())
+ {
+ gSecAPIHandler->addToProtectedMap("mfa_hash", grid, user_id, response["mfa_hash"]);
+ }
+ else if (!LLLoginInstance::getInstance()->saveMFA())
+ {
+ gSecAPIHandler->removeFromProtectedMap("mfa_hash", grid, user_id);
+ }
+ // TODO(brad) - related to SL-17223 consider building a better interface that sync's automatically
+ gSecAPIHandler->syncProtectedMap();
+}
+
std::string construct_start_string()
{
std::string start;