From 8422183958a54e49c230bf85743336e0dd4dff71 Mon Sep 17 00:00:00 2001
From: Brad Kittenbrink <brad@lindenlab.com>
Date: Fri, 4 Feb 2022 14:03:05 -0800
Subject: [PATCH] Related to fix for SL-16792, standardize on naming the filed
 simply mfa_hash end-to-end to avoid confusion

---
 indra/newview/app_settings/settings_per_account.xml | 2 +-
 indra/newview/lllogininstance.cpp                   | 8 ++++----
 indra/newview/llstartup.cpp                         | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index 7d4af7db7fb..c45e841b943 100644
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -436,7 +436,7 @@
         <key>Value</key>
         <integer>2</integer>
       </map>
-      <key>SLMFAHash</key>
+      <key>MFAHash</key>
       <map>
         <key>Comment</key>
         <string>MFA state hash for authentication</string>
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index 2b1dbc869ad..06dbf97e51b 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -230,15 +230,15 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
     // log request_params _before_ adding the credentials or sensitive MFA hash data
     LL_DEBUGS("LLLogin") << "Login parameters: " << LLSDOStreamer<LLSDNotationFormatter>(request_params) << LL_ENDL;
 
-    std::string slmfa_hash = gSavedPerAccountSettings.getString("SLMFAHash"); //non-persistent to enable testing
-    if(slmfa_hash.empty())
+    std::string mfa_hash = gSavedPerAccountSettings.getString("MFAHash"); //non-persistent to enable testing
+    if(mfa_hash.empty())
     {
         LLPointer<LLSecAPIHandler> basic_secure_store = getSecHandler(BASIC_SECHANDLER);
         std::string grid(LLGridManager::getInstance()->getGridId());
-        slmfa_hash = basic_secure_store->getProtectedData("slmfa_hash", grid).asString();
+        mfa_hash = basic_secure_store->getProtectedData("mfa_hash", grid).asString();
     }
 
-    request_params["slmfa_hash"] = slmfa_hash;
+    request_params["mfa_hash"] = mfa_hash;
 
     // Copy the credentials into the request after logging the rest
     LLSD credentials(user_credential->getLoginParams());
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 956ed2d2125..b85c01a1f06 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -3598,11 +3598,11 @@ bool process_login_success_response()
 		LLViewerMedia::getInstance()->openIDSetup(openid_url, openid_token);
 	}
 
-	if(response.has("slmfa_hash"))
+	if(response.has("mfa_hash"))
 	{
 		LLPointer<LLSecAPIHandler> basic_secure_store = getSecHandler(BASIC_SECHANDLER);
 		std::string grid(LLGridManager::getInstance()->getGridId());
-		basic_secure_store->setProtectedData("slmfa_hash", grid, response["slmfa_hash"]);
+		basic_secure_store->setProtectedData("mfa_hash", grid, response["mfa_hash"]);
 	}
 
 	bool success = false;
-- 
GitLab