Fix for SL-17223 save mfa_hash protected store immediately so it doesn't get lost in case of crash
parent
e9921e77b0
commit
372a04dd51
|
|
@ -485,6 +485,9 @@ public:
|
|||
const std::string& data_id,
|
||||
const std::string& map_elem)=0;
|
||||
|
||||
// ensure protected store's map is written to storage
|
||||
virtual void syncProtectedMap() = 0;
|
||||
|
||||
public:
|
||||
virtual LLPointer<LLCredential> createCredential(const std::string& grid,
|
||||
const LLSD& identifier,
|
||||
|
|
|
|||
|
|
@ -1608,6 +1608,11 @@ void LLSecAPIBasicHandler::removeFromProtectedMap(const std::string& data_type,
|
|||
}
|
||||
}
|
||||
|
||||
void LLSecAPIBasicHandler::syncProtectedMap()
|
||||
{
|
||||
// TODO - consider unifing these functions
|
||||
_writeProtectedData();
|
||||
}
|
||||
//
|
||||
// Create a credential object from an identifier and authenticator. credentials are
|
||||
// per grid.
|
||||
|
|
|
|||
|
|
@ -278,6 +278,9 @@ public:
|
|||
const std::string& data_id,
|
||||
const std::string& map_elem);
|
||||
|
||||
// ensure protected store's map is written to storage
|
||||
virtual void syncProtectedMap();
|
||||
|
||||
// credential management routines
|
||||
|
||||
virtual LLPointer<LLCredential> createCredential(const std::string& grid,
|
||||
|
|
|
|||
|
|
@ -3671,6 +3671,8 @@ bool process_login_success_response()
|
|||
std::string grid(LLGridManager::getInstance()->getGridId());
|
||||
std::string user_id(gUserCredential->userID());
|
||||
gSecAPIHandler->addToProtectedMap("mfa_hash", grid, user_id, response["mfa_hash"]);
|
||||
// TODO(brad) - related to SL-17223 consider building a better interface that sync's automatically
|
||||
gSecAPIHandler->syncProtectedMap();
|
||||
}
|
||||
|
||||
bool success = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue