aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid wahl <nrwahl@protonmail.com>2020-06-08 22:50:00 -0700
committerJake Hunsaker <jhunsake@redhat.com>2020-06-17 12:16:34 -0400
commitb34edec39189d5501b9943f73ec2afa7c7b98d58 (patch)
tree10b95d08ae771f1ca7fb693ba78802153ddd6ac6
parentfa7e771cc34fd88aedfb969a1a2b1f5c19680611 (diff)
downloadsos-b34edec39189d5501b9943f73ec2afa7c7b98d58.tar.gz
[pacemaker] Fix scrubbing when password contains an equal sign
If the password contains one or more equal signs ('='), only the substring after the final equal sign is scrubbed. The rest of the password appears in plain text. This patch modifies the scrub regex to scrub all characters after the first equal sign. Related to RHBZ#1845386. Resolves: #2109 Signed-off-by: Reid Wahl <nrwahl@protonmail.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r--sos/report/plugins/pacemaker.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sos/report/plugins/pacemaker.py b/sos/report/plugins/pacemaker.py
index 7294c35a..8beec811 100644
--- a/sos/report/plugins/pacemaker.py
+++ b/sos/report/plugins/pacemaker.py
@@ -55,14 +55,14 @@ class Pacemaker(Plugin):
def postproc_crm_shell(self):
self.do_cmd_output_sub(
"crm configure show",
- r"passw(\S*)=\S+",
+ r"passw([^\s=]*)=\S+",
r"passw\1=********"
)
def postproc_pcs(self):
self.do_cmd_output_sub(
"pcs config",
- r"passw(\S*)=\S+",
+ r"passw([^\s=]*)=\S+",
r"passw\1=********"
)