mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Properly quote passwords sent to pkisilent so special characters work.
Also check for url-encoded passwords before logging them. ticket 324
This commit is contained in:
committed by
Simo Sorce
parent
67d1c07112
commit
623abc6bdf
@@ -28,6 +28,7 @@ import random
|
||||
import os, sys, traceback, readline
|
||||
import stat
|
||||
import shutil
|
||||
import urllib2
|
||||
|
||||
from ipapython import ipavalidate
|
||||
from types import *
|
||||
@@ -129,6 +130,10 @@ def run(args, stdin=None, raiseonerr=True, nolog=(), env=None):
|
||||
args = args.replace(value, 'XXXXXXXX')
|
||||
stdout = stdout.replace(value, 'XXXXXXXX')
|
||||
stderr = stderr.replace(value, 'XXXXXXXX')
|
||||
quoted = urllib2.quote(value)
|
||||
args = args.replace(quoted, 'XXXXXXXX')
|
||||
stdout = stdout.replace(quoted, 'XXXXXXXX')
|
||||
stderr = stderr.replace(quoted, 'XXXXXXXX')
|
||||
logging.info('args=%s' % args)
|
||||
logging.info('stdout=%s' % stdout)
|
||||
logging.info('stderr=%s' % stderr)
|
||||
|
||||
Reference in New Issue
Block a user