Blame SOURCES/sos-bz1845386-pacemaker-passwords-with-equal-sign.patch

2ff1a5
From b34edec39189d5501b9943f73ec2afa7c7b98d58 Mon Sep 17 00:00:00 2001
2ff1a5
From: Reid wahl <nrwahl@protonmail.com>
2ff1a5
Date: Mon, 8 Jun 2020 22:50:00 -0700
2ff1a5
Subject: [PATCH] [pacemaker] Fix scrubbing when password contains an equal
2ff1a5
 sign
2ff1a5
2ff1a5
If the password contains one or more equal signs ('='), only the substring
2ff1a5
after the final equal sign is scrubbed. The rest of the password appears in
2ff1a5
plain text.
2ff1a5
2ff1a5
This patch modifies the scrub regex to scrub all characters after the first
2ff1a5
equal sign.
2ff1a5
2ff1a5
Related to RHBZ#1845386.
2ff1a5
Resolves: #2109
2ff1a5
2ff1a5
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
2ff1a5
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
2ff1a5
---
2ff1a5
 sos/plugins/pacemaker.py | 4 ++--
2ff1a5
 1 file changed, 2 insertions(+), 2 deletions(-)
2ff1a5
2ff1a5
diff --git a/sos/plugins/pacemaker.py b/sos/plugins/pacemaker.py
2ff1a5
index 7294c35a..8beec811 100644
2ff1a5
--- a/sos/plugins/pacemaker.py
2ff1a5
+++ b/sos/plugins/pacemaker.py
2ff1a5
@@ -55,14 +55,14 @@ class Pacemaker(Plugin):
2ff1a5
     def postproc_crm_shell(self):
2ff1a5
         self.do_cmd_output_sub(
2ff1a5
             "crm configure show",
2ff1a5
-            r"passw(\S*)=\S+",
2ff1a5
+            r"passw([^\s=]*)=\S+",
2ff1a5
             r"passw\1=********"
2ff1a5
         )
2ff1a5
 
2ff1a5
     def postproc_pcs(self):
2ff1a5
         self.do_cmd_output_sub(
2ff1a5
             "pcs config",
2ff1a5
-            r"passw(\S*)=\S+",
2ff1a5
+            r"passw([^\s=]*)=\S+",
2ff1a5
             r"passw\1=********"
2ff1a5
         )
2ff1a5
 
2ff1a5
-- 
2ff1a5
2.26.2
2ff1a5