File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -242,15 +242,15 @@ def drag_sensitive(config):
242242 conf_dict_copy = copy .deepcopy (conf_dict )
243243 for key in conf_dict_copy :
244244 if "key" in key or "secret" in key :
245- if isinstance (key , str ):
245+ if isinstance (conf_dict_copy [ key ] , str ):
246246 conf_dict_copy [key ] = conf_dict_copy [key ][0 :3 ] + "*" * 5 + conf_dict_copy [key ][- 3 :]
247247 return json .dumps (conf_dict_copy , indent = 4 )
248248
249249 elif isinstance (config , dict ):
250250 config_copy = copy .deepcopy (config )
251251 for key in config :
252252 if "key" in key or "secret" in key :
253- if isinstance (key , str ):
253+ if isinstance (config_copy [ key ] , str ):
254254 config_copy [key ] = config_copy [key ][0 :3 ] + "*" * 5 + config_copy [key ][- 3 :]
255255 return config_copy
256256 except Exception as e :
You can’t perform that action at this time.
0 commit comments