mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
App installs logs were still disclosing secrets when shared sometimes...
This commit is contained in:
parent
776c1ab84b
commit
d34d6b1949
4 changed files with 9 additions and 8 deletions
|
@ -294,7 +294,6 @@
|
||||||
"dyndns_registration_failed": "Could not register DynDNS domain: {error:s}",
|
"dyndns_registration_failed": "Could not register DynDNS domain: {error:s}",
|
||||||
"dyndns_domain_not_provided": "DynDNS provider {provider:s} cannot provide domain {domain:s}.",
|
"dyndns_domain_not_provided": "DynDNS provider {provider:s} cannot provide domain {domain:s}.",
|
||||||
"dyndns_unavailable": "The domain '{domain:s}' is unavailable.",
|
"dyndns_unavailable": "The domain '{domain:s}' is unavailable.",
|
||||||
"executing_command": "Executing command '{command:s}'...",
|
|
||||||
"executing_script": "Executing script '{script:s}'...",
|
"executing_script": "Executing script '{script:s}'...",
|
||||||
"extracting": "Extracting...",
|
"extracting": "Extracting...",
|
||||||
"experimental_feature": "Warning: This feature is experimental and not considered stable, you should not use it unless you know what you are doing.",
|
"experimental_feature": "Warning: This feature is experimental and not considered stable, you should not use it unless you know what you are doing.",
|
||||||
|
|
|
@ -743,7 +743,13 @@ def app_install(operation_logger, app, label=None, args=None, no_remove_on_failu
|
||||||
env_dict["YNH_APP_ID"] = app_id
|
env_dict["YNH_APP_ID"] = app_id
|
||||||
env_dict["YNH_APP_INSTANCE_NAME"] = app_instance_name
|
env_dict["YNH_APP_INSTANCE_NAME"] = app_instance_name
|
||||||
env_dict["YNH_APP_INSTANCE_NUMBER"] = str(instance_number)
|
env_dict["YNH_APP_INSTANCE_NUMBER"] = str(instance_number)
|
||||||
operation_logger.extra.update({'env': env_dict})
|
|
||||||
|
env_dict_for_logging = env_dict.copy()
|
||||||
|
for arg_name, arg_value_and_type in args_odict.items():
|
||||||
|
if arg_value_and_type[1] == "password":
|
||||||
|
del env_dict_for_logging["YNH_APP_ARG_%s" % arg_name.upper()]
|
||||||
|
|
||||||
|
operation_logger.extra.update({'env': env_dict_for_logging})
|
||||||
|
|
||||||
# We'll check that the app didn't brutally edit some system configuration
|
# We'll check that the app didn't brutally edit some system configuration
|
||||||
manually_modified_files_before_install = manually_modified_files()
|
manually_modified_files_before_install = manually_modified_files()
|
||||||
|
|
|
@ -398,12 +398,7 @@ def _hook_exec_bash(path, args, no_trace, chdir, env, user, return_format, logge
|
||||||
for k, v in env.items()]), cmd)
|
for k, v in env.items()]), cmd)
|
||||||
command.append(cmd.format(script=cmd_script, args=cmd_args))
|
command.append(cmd.format(script=cmd_script, args=cmd_args))
|
||||||
|
|
||||||
if logger.isEnabledFor(log.DEBUG):
|
logger.debug("Executing command '%s'" % ' '.join(command))
|
||||||
logger.debug(m18n.n('executing_command', command=' '.join(command)))
|
|
||||||
else:
|
|
||||||
logger.debug(m18n.n('executing_script', script=path))
|
|
||||||
|
|
||||||
logger.debug("About to run the command '%s'" % command)
|
|
||||||
|
|
||||||
returncode = call_async_output(
|
returncode = call_async_output(
|
||||||
command, loggers, shell=False, cwd=chdir,
|
command, loggers, shell=False, cwd=chdir,
|
||||||
|
|
|
@ -467,6 +467,7 @@ class OperationLogger(object):
|
||||||
'started_at': self.started_at,
|
'started_at': self.started_at,
|
||||||
'operation': self.operation,
|
'operation': self.operation,
|
||||||
'yunohost_version': get_ynh_package_version("yunohost")["version"],
|
'yunohost_version': get_ynh_package_version("yunohost")["version"],
|
||||||
|
'interface': msettings.get('interface') == 'api',
|
||||||
}
|
}
|
||||||
if self.related_to is not None:
|
if self.related_to is not None:
|
||||||
data['related_to'] = self.related_to
|
data['related_to'] = self.related_to
|
||||||
|
|
Loading…
Add table
Reference in a new issue