Skip to content

Commit

Permalink
CA-403593: don't log the session ref
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Syms <[email protected]>
  • Loading branch information
MarkSymsCtx committed Jan 20, 2025
1 parent a73edc3 commit 3a2ce72
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions drivers/SRCommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,16 @@ def _run(self, sr, target):
dconf_type = sr.dconf.get("type")
if not dconf_type or not NO_LOGGING.get(dconf_type) or \
self.cmd not in NO_LOGGING[dconf_type]:
if 'device_config' in self.params:
util.SMlog("%s %s" % (
self.cmd, util.hidePasswdInParams(
self.params, 'device_config')))
else:
util.SMlog("%s %s" % (self.cmd, repr(self.params)))
params_to_log = self.params

if 'device_config' in params_to_log:
params_to_log = util.hidePasswdInParams(
self.params, 'device_config')

if 'session_ref' in params_to_log:
params_to_log['session_ref'] = '******'

util.SMlog("%s %s" % (self.cmd, repr(params_to_log)))

caching_params = dict((k, self.params.get(k)) for k in
[blktap2.VDI.CONF_KEY_ALLOW_CACHING,
Expand Down

0 comments on commit 3a2ce72

Please sign in to comment.