Core/CrashHandler: Remove sensitive data from crashlogs

(cherry picked from commit 25bcb1a0b2)
(cherry picked from commit 37478c5ac1)
This commit is contained in:
jackpoz
2019-04-28 17:32:53 +02:00
committed by Shauren
parent cf979de813
commit 49414acaef
2 changed files with 20 additions and 14 deletions

View File

@@ -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