mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
remove args for metadata (#1405)
* remove args for metadata * Add explanation for removing 'args' from log metadata Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
This commit is contained in:
parent
24f8faca67
commit
2b3138ef80
1 changed files with 5 additions and 0 deletions
|
@ -659,6 +659,11 @@ class OperationLogger:
|
||||||
data["error"] = self._error
|
data["error"] = self._error
|
||||||
# TODO: detect if 'extra' erase some key of 'data'
|
# TODO: detect if 'extra' erase some key of 'data'
|
||||||
data.update(self.extra)
|
data.update(self.extra)
|
||||||
|
# Remove the 'args' arg from args (yodawg). It corresponds to url-encoded args for app install, config panel set, etc
|
||||||
|
# Because the data are url encoded, it's hell to properly redact secrets inside it,
|
||||||
|
# and the useful info is usually already available in `env` too
|
||||||
|
if "args" in data and isinstance(data["args"], dict) and "args" in data["args"]:
|
||||||
|
data["args"].pop("args")
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def success(self):
|
def success(self):
|
||||||
|
|
Loading…
Add table
Reference in a new issue