1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-26 00:12:29 +01:00

Mask out sensitive information in the logfile

This commit is contained in:
David Paleino
2011-12-17 07:55:18 +01:00
parent d5be8c76c8
commit 9f5db3cf5b

View File

@@ -120,8 +120,13 @@ class ConfigManager(RawConfigParser):
ret = to_unicode(ret)
if default:
if self.debug:
print ''.join(['found ', option, ' in configuration ',
str(ret)])
# mask out sensitive information
if option in ['apsk', 'password', 'identity', 'private_key', \
'private_key_passwd', 'key', 'passphrase']:
print ''.join(['found ', option, ' in configuration *****'])
else:
print ''.join(['found ', option, ' in configuration ',
str(ret)])
else:
if default != "__None__":
print 'did not find %s in configuration, setting default %s' % (option, str(default))