Core/CrashHandler: Remove sensitive data from crashlogs

(cherry picked from commit 25bcb1a0b2d9326519d9226dfe968caf26bb4e2d)
(cherry picked from commit 37478c5ac1efb8e4f19ffc94f444e160600c7b27)
This commit is contained in:
jackpoz
2021-12-02 00:39:28 +01:00
committed by Shauren
parent cf979de813
commit 49414acaef
2 changed files with 20 additions and 14 deletions
@@ -1493,4 +1493,23 @@ void WheatyExceptionReport::PrintSymbolDetail()
return;
}
std::string SymbolDetail::ToString()
{
Logged = true;
std::string formatted = Prefix + Type + Suffix;
if (!Name.empty())
{
if (!formatted.empty())
formatted += " ";
formatted += Name;
}
if (!Value.empty())
{
if (Name == "passwd" || Name == "password")
Value = "<sensitive data>";
formatted += " = " + Value;
}
return formatted;
}
#endif // _WIN32