SL-13008 Crash after a second login attempt with unsupported name format

master
Andrey Kleshchev 2020-04-16 22:28:28 +03:00
parent 668e6e359b
commit a5eb15da0a
2 changed files with 10 additions and 2 deletions

View File

@ -684,7 +684,6 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,
if (LLPanelLogin::sInstance->mPasswordModified)
{
authenticator = LLSD::emptyMap();
// password is plaintext
authenticator["type"] = CRED_AUTHENTICATOR_TYPE_CLEAR;
authenticator["secret"] = password;
@ -695,6 +694,15 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,
if (credential.notNull())
{
authenticator = credential->getAuthenticator();
if (authenticator.emptyMap())
{
// Likely caused by user trying to log in to non-system grid
// with unsupported name format, just retry
LL_WARNS() << "Authenticator failed to load for: " << username << LL_ENDL;
// password is plaintext
authenticator["type"] = CRED_AUTHENTICATOR_TYPE_CLEAR;
authenticator["secret"] = password;
}
}
}
}

View File

@ -117,7 +117,7 @@ LLSD LLCredential::getLoginParams()
else if (mIdentifier["type"].asString() == "account")
{
result["username"] = mIdentifier["account_name"];
result["passwd"] = mAuthenticator["secret"];
result["passwd"] = mAuthenticator["secret"].asString();
username = result["username"].asString();
}
}