From 49414acaef6de26ccddca8deb621dacc6a5731fb Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sun, 28 Apr 2019 17:32:53 +0200 Subject: Core/CrashHandler: Remove sensitive data from crashlogs (cherry picked from commit 25bcb1a0b2d9326519d9226dfe968caf26bb4e2d) (cherry picked from commit 37478c5ac1efb8e4f19ffc94f444e160600c7b27) --- src/common/Debugging/WheatyExceptionReport.cpp | 19 +++++++++++++++++++ src/common/Debugging/WheatyExceptionReport.h | 15 +-------------- 2 files changed, 20 insertions(+), 14 deletions(-) (limited to 'src/common/Debugging') diff --git a/src/common/Debugging/WheatyExceptionReport.cpp b/src/common/Debugging/WheatyExceptionReport.cpp index 5bd0b470077..28f3cf57ded 100644 --- a/src/common/Debugging/WheatyExceptionReport.cpp +++ b/src/common/Debugging/WheatyExceptionReport.cpp @@ -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 = ""; + formatted += " = " + Value; + } + return formatted; +} + #endif // _WIN32 diff --git a/src/common/Debugging/WheatyExceptionReport.h b/src/common/Debugging/WheatyExceptionReport.h index a6f871bfb13..54cc836e7b7 100644 --- a/src/common/Debugging/WheatyExceptionReport.h +++ b/src/common/Debugging/WheatyExceptionReport.h @@ -115,20 +115,7 @@ struct SymbolDetail { SymbolDetail() : Prefix(), Type(), Suffix(), Name(), Value(), Logged(false), HasChildren(false) {} - std::string ToString() - { - Logged = true; - std::string formatted = Prefix + Type + Suffix; - if (!Name.empty()) - { - if (!formatted.empty()) - formatted += " "; - formatted += Name; - } - if (!Value.empty()) - formatted += " = " + Value; - return formatted; - } + std::string ToString(); bool empty() const { -- cgit v1.2.3