mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-28 09:06:44 -06:00
ipapython.ipautil.nolog_replace: Do not replace empty value
When provided empty value in nolog parameter nolog_replace added 'XXXXXXXX' three (once for plain value, once for http quoted value and last time for shell quoted value) times before every character (including terminating '\0') in the string. https://pagure.io/freeipa/issue/6738 Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
This commit is contained in:
parent
5caade9912
commit
40e1eb695d
@ -525,7 +525,7 @@ def run(args, stdin=None, raiseonerr=True, nolog=(), env=None,
|
||||
def nolog_replace(string, nolog):
|
||||
"""Replace occurences of strings given in `nolog` with XXXXXXXX"""
|
||||
for value in nolog:
|
||||
if not isinstance(value, six.string_types):
|
||||
if not value or not isinstance(value, six.string_types):
|
||||
continue
|
||||
|
||||
quoted = urllib.parse.quote(value)
|
||||
|
Loading…
Reference in New Issue
Block a user