init: log that additional logs may contain privacy-sensitive information
What changed, and why it matters
This commit adds a simple informational log message warning users that enabling debug logging may write privacy-sensitive details (like transaction IDs) into log files, so they should be careful when sharing logs. It is a user-awareness/privacy-hardening change, not a fix for an exploitable security flaw.
No security action required. Treat as a routine documentation/usability improvement. Users may review operational log-sharing practices in light of the new warning.
Security signals we found
privacy-awareness hardening
no code behavior change beyond logging
no vulnerability fix present in diff
Evidence from the diff
The change inserts a single LogInfo() call in SetLoggingCategories() in src/init/common.cpp. If any -debug category is active (category mask is not BCLog::NONE), Bitcoin Core now prints: ‘Debug logging is enabled (-debug). Additional log output may contain privacy-sensitive information. Be cautious when sharing logs.’ There is no functional behavior change, no access-control modification, and no vulnerability remediation.
Changed components
src/init/common.cppSetLoggingCategories()Inspect captured patch +5 / −0
diff --git a/src/init/common.cpp b/src/init/common.cpp
index d1926d04..5436cba5 100644
--- a/src/init/common.cpp
+++ b/src/init/common.cpp
@@ -98,6 +98,11 @@ util::Result<void> SetLoggingCategories(const ArgsManager& args)
return util::Error{strprintf(_("Unsupported logging category %s=%s."), "-debugexclude", cat)};
}
}
+
+ if (LogInstance().GetCategoryMask() != BCLog::NONE) {
+ LogInfo("Debug logging is enabled (-debug). Additional log output may contain privacy-sensitive information. Be cautious when sharing logs.");
+ }
+
return {};
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.