make properly sure that the wifi password does not get logged
Two of these were properly stupid :( LP: #1636421 (again)
This commit is contained in:
parent
4a3955d8de
commit
019b5c4b3e
|
@ -192,9 +192,7 @@ def sanitize_config(config):
|
|||
"""Return a copy of config with passwords redacted."""
|
||||
config = copy.deepcopy(config)
|
||||
for iface, iface_config in config.get('network', {}).get('wifis', {}).items():
|
||||
log.debug("%s %s", iface, iface_config)
|
||||
for ap, ap_config in iface_config.get('access-points', {}).items():
|
||||
log.debug(" - %s %s", ap, ap_config)
|
||||
if 'password' in ap_config:
|
||||
ap_config['password'] = '<REDACTED>'
|
||||
return config
|
||||
|
|
|
@ -66,7 +66,8 @@ class Signal:
|
|||
urwid.emit_signal(self, 'menu:welcome:main')
|
||||
|
||||
def emit_signal(self, name, *args, **kwargs):
|
||||
log.debug("Emitter: {}, {}, {}".format(name, args, kwargs))
|
||||
# Disabled because it can reveal credentials in the arguments.
|
||||
#log.debug("Emitter: {}, {}, {}".format(name, args, kwargs))
|
||||
if name.startswith("menu:"):
|
||||
log.debug(" emit: before: "
|
||||
"size={} stack={}".format(len(self.signal_stack),
|
||||
|
|
Loading…
Reference in New Issue