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:
Rob Crittenden authored and Simo Sorce committed 2010-12-17 16:50:14 -05:00
1 parent 67d1c07112
commit 623abc6bdf
2 files changed
+12 -7

No files matched your search

+5
View File
@@ -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)