aboutsummaryrefslogtreecommitdiff
path: root/src/common/Debugging/WheatyExceptionReport.cpp
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2019-04-28 17:32:53 +0200
committerShauren <shauren.trinity@gmail.com>2021-12-02 00:39:28 +0100
commit49414acaef6de26ccddca8deb621dacc6a5731fb (patch)
tree02a5723930599db234472f10a206f53bf213d974 /src/common/Debugging/WheatyExceptionReport.cpp
parentcf979de8133767d598f002c8c2e7b61355ac634d (diff)
Core/CrashHandler: Remove sensitive data from crashlogs
(cherry picked from commit 25bcb1a0b2d9326519d9226dfe968caf26bb4e2d) (cherry picked from commit 37478c5ac1efb8e4f19ffc94f444e160600c7b27)
Diffstat (limited to 'src/common/Debugging/WheatyExceptionReport.cpp')
-rw-r--r--src/common/Debugging/WheatyExceptionReport.cpp19
1 files changed, 19 insertions, 0 deletions
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 = "<sensitive data>";
+ formatted += " = " + Value;
+ }
+ return formatted;
+}
+
#endif // _WIN32