Skip to content

Commit

Permalink
Prevents empty account names in AllLocallyAuthenticatedUserHashes
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosNihelton committed Sep 19, 2023
1 parent bfbf46d commit f6c004c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion storeapi/base/impl/StoreContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ std::vector<std::string> StoreContext::AllLocallyAuthenticatedUserHashes() {
IInspectable accountName =
user.GetPropertyAsync(KnownUserProperties::AccountName()).get();
auto name = winrt::unbox_value<winrt::hstring>(accountName);
allHashes.push_back(winrt::to_string(sha256(name)));
if (!name.empty()) {
allHashes.push_back(winrt::to_string(sha256(name)));
}
}

return allHashes;
Expand Down

0 comments on commit f6c004c

Please sign in to comment.