mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Work around pkisilent bugs.
Check directory manager password and certificate subject base for invalid characters. (https://bugzilla.redhat.com/show_bug.cgi?id=658641) Shell-escape pkisilent command-line arguments. (https://bugzilla.redhat.com/show_bug.cgi?id=741180) ticket 1636
This commit is contained in:
committed by
Rob Crittenden
parent
3fb40170cb
commit
209bcb0b98
@@ -196,6 +196,9 @@ def write_tmp_file(txt):
|
||||
|
||||
return fd
|
||||
|
||||
def shell_quote(string):
|
||||
return "'" + string.replace("'", "'\\''") + "'"
|
||||
|
||||
def run(args, stdin=None, raiseonerr=True,
|
||||
nolog=(), env=None, capture_output=True):
|
||||
"""
|
||||
@@ -248,7 +251,8 @@ def run(args, stdin=None, raiseonerr=True,
|
||||
continue
|
||||
|
||||
quoted = urllib2.quote(value)
|
||||
for nolog_value in (value, quoted):
|
||||
shquoted = shell_quote(value)
|
||||
for nolog_value in (shquoted, value, quoted):
|
||||
if capture_output:
|
||||
stdout = stdout.replace(nolog_value, 'XXXXXXXX')
|
||||
stderr = stderr.replace(nolog_value, 'XXXXXXXX')
|
||||
|
||||
Reference in New Issue
Block a user