From b0ac904a84b223808c303f170888559b91c71e71 Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 30 Sep 2009 13:43:24 +0200 Subject: default send anonymized crashlogs --- main/bsod.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/bsod.cpp') diff --git a/main/bsod.cpp b/main/bsod.cpp index 42e37f81..fde4146b 100644 --- a/main/bsod.cpp +++ b/main/bsod.cpp @@ -242,7 +242,7 @@ void bsodFatal(const char *component) fprintf(f, "\t\t%s\n", kernelcmd); } std::string sendAnonCrashlog = getConfigFileValue("config.plugins.crashlogautosubmit.sendAnonCrashlog"); - if (sendAnonCrashlog == "False" || sendAnonCrashlog == "false" || sendAnonCrashlog == "") // defaults to false, so "" is also ok. + if (sendAnonCrashlog == "False" || sendAnonCrashlog == "false") // defaults to true... default anonymized crashlogs { std::string ca = getFileContent("/proc/stb/info/ca"); if (ca != "Error") -- cgit v1.2.3 From aad3256fb995891065c9771bf2af8d3ad74527fc Mon Sep 17 00:00:00 2001 From: acid-burn Date: Sat, 3 Oct 2009 11:29:04 +0200 Subject: main/bsod.cpp: replace password configentry values with "X" before adding them to the crashlog. So now no passwords from the enigma2 settings file are added to the crashlogs if crashlog anonymizations is disabled. Attention: Only config entries named "password" are considered as password fields. So use "password" as the name of your password configentry. for example: config.myplugin.password ! --- main/bsod.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) mode change 100644 => 100755 main/bsod.cpp (limited to 'main/bsod.cpp') diff --git a/main/bsod.cpp b/main/bsod.cpp old mode 100644 new mode 100755 index fde4146b..45f97c6b --- a/main/bsod.cpp +++ b/main/bsod.cpp @@ -74,7 +74,7 @@ static std::string getConfigFileValue(const char *entry) { return configvalue; } - else // get Value from enigma2 settings file + else // get value from enigma2 settings file { FILE *f = fopen(configfile.c_str(), "r"); if (!f) @@ -119,7 +119,21 @@ static std::string getFileContent(const char *file) char line[1024]; if (!fgets(line, 1024, f)) break; - filecontent += line; + std::string tmp = line; + std::string password; + int pwdpos = tmp.find(".password=", 0); + if( pwdpos != std::string::npos) + { + filecontent += tmp.substr(0,pwdpos +10); + for ( int pos = pwdpos +10; pos < tmp.length()-1; ++pos ) + { + filecontent += "X"; + } + filecontent += "\n"; + } + else { + filecontent += line; + } } fclose(f); } -- cgit v1.2.3