From 19caca91e98e41187f76c9925c31b8fba33c2902 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 7 Jan 2020 00:52:04 +0200 Subject: SL-12486 Better data deletion --- indra/newview/llsechandler_basic.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'indra/newview/llsechandler_basic.cpp') diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp index a8bb54a90e..2932ae45a3 100644 --- a/indra/newview/llsechandler_basic.cpp +++ b/indra/newview/llsechandler_basic.cpp @@ -1664,6 +1664,19 @@ bool LLSecAPIBasicHandler::hasCredentialMap(const std::string& storage, const st return credential.isMap(); } +// returns true if map is empty or does not exist +bool LLSecAPIBasicHandler::emptyCredentialMap(const std::string& storage, const std::string& grid) +{ + if (storage == DEFAULT_CREDENTIAL_STORAGE) + { + LL_ERRS() << "Storing maps in default, single-items storage is not allowed" << LL_ENDL; + } + + LLSD credential = getProtectedData(storage, grid); + + return !credential.isMap() || credential.emptyMap(); +} + // Load map of credentials from specified credential store, given the grid void LLSecAPIBasicHandler::loadCredentialMap(const std::string& storage, const std::string& grid, credential_map_t& credential_map) { -- cgit v1.2.3