mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-02 06:40:42 -07:00
ea3: remove verbose debug logs by default (#385)
## Link to GitHub Issue, if one exists n/a ## Description of change Recently distributed iidx data has this enabled in ea3-config.xml by default, exposing people's PCBID in the logs. Find the node in the XML and remove it on boot, unless user overrides it with a new option. ## Testing Tested using asphyxia.
This commit is contained in:
@@ -41,6 +41,7 @@ namespace avs {
|
||||
int HTTP11 = -1;
|
||||
int URL_SLASH = -1;
|
||||
int PCB_TYPE = -1;
|
||||
bool EA3_DEBUG_VERBOSE = false;
|
||||
|
||||
// handle
|
||||
std::string VERSION_STR = "unknown";
|
||||
@@ -412,6 +413,11 @@ namespace avs {
|
||||
log_fatal("avs-ea3", "no PCBID set (try using -p to specify PCBID)");
|
||||
}
|
||||
|
||||
// remove <debug> since it can expose pcbid in logged requests
|
||||
if (!EA3_DEBUG_VERBOSE) {
|
||||
avs::core::property_search_remove_safe(ea3_config, nullptr, "/ea3/debug/verbose");
|
||||
}
|
||||
|
||||
// remember IDs
|
||||
char pcbid_buffer[256] { 0 };
|
||||
char accountid_buffer[256] { 0 };
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace avs {
|
||||
extern int HTTP11;
|
||||
extern int URL_SLASH;
|
||||
extern int PCB_TYPE;
|
||||
extern bool EA3_DEBUG_VERBOSE;
|
||||
|
||||
// handle
|
||||
extern std::string VERSION_STR;
|
||||
|
||||
Reference in New Issue
Block a user