summaryrefslogtreecommitdiff
path: root/oslo_utils/strutils.py
diff options
context:
space:
mode:
authorHervé Beraud <hberaud@redhat.com>2022-03-09 14:23:29 +0100
committerHervé Beraud <hberaud@redhat.com>2022-03-10 15:58:01 +0100
commit2c1b0628771695e546b0acb1e3c44c16c0c690db (patch)
tree5b15a42339c02c91046822e2007d10add155d74a /oslo_utils/strutils.py
parenteb0c50a45e240fba54f16c1fc76c2d442df3e678 (diff)
downloadoslo-utils-2c1b0628771695e546b0acb1e3c44c16c0c690db.tar.gz
fix strutils password regex4.12.3
Those regexes will fix Object style representation output. See the payload used in tests for details. This kind of output can be obtained by using the command: ``` $ openstack --debug ``` Co-Authored-By: Daniel Bengtsson <dbengt@redhat.com> Change-Id: I9024be93b109d1b64ca736546c0f69db7a5e06d0 (cherry picked from commit de4429f2be5fa21d1f6e1cacbb3c8417a7c56310)
Diffstat (limited to 'oslo_utils/strutils.py')
-rw-r--r--oslo_utils/strutils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/oslo_utils/strutils.py b/oslo_utils/strutils.py
index e27a63d..0bb9fc5 100644
--- a/oslo_utils/strutils.py
+++ b/oslo_utils/strutils.py
@@ -79,6 +79,8 @@ _SANITIZE_PATTERNS_WILDCARD = {}
# have two parameters. Use different lists of patterns here.
_FORMAT_PATTERNS_1 = [r'(%(key)s[0-9]*\s*[=]\s*)[^\s^\'^\"]+']
_FORMAT_PATTERNS_2 = [r'(%(key)s[0-9]*\s*[=]\s*[\"\'])[^\"\']*([\"\'])',
+ r'(%(key)s[0-9]*\s*[=]\s*[\"])[^\"]*([\"])',
+ r'(%(key)s[0-9]*\s*[=]\s*[\'])[^\']*([\'])',
r'(%(key)s[0-9]*\s+[\"\'])[^\"\']*([\"\'])',
r'([-]{2}%(key)s[0-9]*\s+)[^\'^\"^=^\s]+([\s]*)',
r'(<%(key)s[0-9]*>)[^<]*(</%(key)s[0-9]*>)',