diff options
author | Reid wahl <nrwahl@protonmail.com> | 2020-06-08 22:50:00 -0700 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2020-06-17 12:16:34 -0400 |
commit | b34edec39189d5501b9943f73ec2afa7c7b98d58 (patch) | |
tree | 10b95d08ae771f1ca7fb693ba78802153ddd6ac6 | |
parent | fa7e771cc34fd88aedfb969a1a2b1f5c19680611 (diff) | |
download | sos-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.py | 4 |
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=********" ) |