Blob Blame History Raw
From 81fd964b6c9e5952eef8233cf03774ad05a41ad5 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Thu, 6 Nov 2014 06:34:35 +0100
Subject: [LIBREPORT PATCH] anaconda: auto-remove rootpw lines

Replace that lines with:
<auto-removed line containing rootpw>

in the following files:
 - backtrace
 - ks.cfg

Related to #1041558

Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
 src/plugins/bugzilla_anaconda_event.conf | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/plugins/bugzilla_anaconda_event.conf b/src/plugins/bugzilla_anaconda_event.conf
index 430e5ee..923dda0 100644
--- a/src/plugins/bugzilla_anaconda_event.conf
+++ b/src/plugins/bugzilla_anaconda_event.conf
@@ -1,4 +1,13 @@
 EVENT=report_Bugzilla component=anaconda
+	# remove sensitive information from the sensitive files
+	for sf in backtrace ks.cfg; do
+		if [ -f $sf ]; then
+			# blindly remove entire line
+			# filing a less usable bug is surely better than publishing passwords
+			sed 's/^.*rootpw.*$/<auto-removed line containing rootpw>/' -i $sf
+		fi
+	done
+	# file a bug in Bugzilla
 	reporter-bugzilla -b \
 		-F /etc/libreport/plugins/bugzilla_format_anaconda.conf \
 		-A /etc/libreport/plugins/bugzilla_formatdup_anaconda.conf
-- 
1.8.3.1