From 0296bd6ca78a8f962e42156265a57e07bb6c1164 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 21 May 2025 02:50:39 +0300 Subject: #p430 don't show MFA dialog twice --- indra/newview/lllogininstance.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'indra/newview/lllogininstance.cpp') 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; -- cgit v1.3 From 921856d83e3cd5580481713acda318cbe9a39ec3 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Tue, 23 Sep 2025 22:35:01 +0300 Subject: #4730 Extend login timeout --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/lllogininstance.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/lllogininstance.cpp') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index e1be629f15..43270eb3ea 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4380,7 +4380,7 @@ Type F32 Value - 40.0 + 90.0 LogMessages diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 4bffe7feac..41cec4f074 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -62,7 +62,7 @@ const S32 LOGIN_MAX_RETRIES = 0; // Viewer should not autmatically retry login const F32 LOGIN_SRV_TIMEOUT_MIN = 10; -const F32 LOGIN_SRV_TIMEOUT_MAX = 120; +const F32 LOGIN_SRV_TIMEOUT_MAX = 180; const F32 LOGIN_DNS_TIMEOUT_FACTOR = 0.9; // make DNS wait shorter then retry time class LLLoginInstance::Disposable { -- cgit v1.3