Blob Blame History Raw
From ad79fd5d28feaf05adddb746ef892a32a56ccfa9 Mon Sep 17 00:00:00 2001
From: Jan Jansky <jjansky@redhat.com>
Date: Fri, 12 Mar 2021 16:23:51 +0100
Subject: [PATCH] [pacemaker] Fix scrubbing when password contains an equal
 sign

Backport #2109 to legacy-3.9.

Related: #2109
Resolves: #2446

Signed-off-by: Jan Jansky <jjansky@redhat.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
---
 sos/plugins/pacemaker.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sos/plugins/pacemaker.py b/sos/plugins/pacemaker.py
index 940389e..f47c66a 100644
--- a/sos/plugins/pacemaker.py
+++ b/sos/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=********"
         )
 
-- 
1.8.3.1