diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2021-04-09 11:32:14 -0400 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2021-04-12 12:34:26 -0400 |
commit | 29afda6e4ff90385d34bc61315542e7cb4baaf8d (patch) | |
tree | 97c9d7f8a0c833b3eaae73e1adf060e6deee46af | |
parent | 8a7ae6a3ac69a020758f7b0825a872e44714dbed (diff) | |
download | sos-29afda6e4ff90385d34bc61315542e7cb4baaf8d.tar.gz |
[cleaner] Do not break iteration of parse_string_for_keys on first match
Previously, `parse_string_for_keys()`, called by `obfuscate_string()`
for non-regex based obfuscations, would return on the first match in the
string found for each parser.
Instead, continue iterating over all items in each parser's dataset
before returning the (now fully) obfuscated string.
Resolves: #2480
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r-- | sos/cleaner/parsers/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/cleaner/parsers/__init__.py b/sos/cleaner/parsers/__init__.py index dd0451df..c77300aa 100644 --- a/sos/cleaner/parsers/__init__.py +++ b/sos/cleaner/parsers/__init__.py @@ -104,7 +104,7 @@ class SoSCleanerParser(): """ for key, val in self.mapping.dataset.items(): if key in string_data: - return string_data.replace(key, val) + string_data = string_data.replace(key, val) return string_data def get_map_contents(self): |