mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Better log redacting
This commit is contained in:
parent
bbc6dcc50b
commit
e21c114b70
3 changed files with 3 additions and 6 deletions
|
@ -140,7 +140,7 @@ def _get_parent_domain_of(domain):
|
||||||
return _get_parent_domain_of(parent_domain)
|
return _get_parent_domain_of(parent_domain)
|
||||||
|
|
||||||
|
|
||||||
@is_unit_operation()
|
@is_unit_operation(exclude=["subscribe"])
|
||||||
def domain_add(operation_logger, domain, subscribe=None, no_subscribe=False):
|
def domain_add(operation_logger, domain, subscribe=None, no_subscribe=False):
|
||||||
"""
|
"""
|
||||||
Create a custom domain
|
Create a custom domain
|
||||||
|
@ -243,7 +243,7 @@ def domain_add(operation_logger, domain, subscribe=None, no_subscribe=False):
|
||||||
logger.success(m18n.n("domain_created"))
|
logger.success(m18n.n("domain_created"))
|
||||||
|
|
||||||
|
|
||||||
@is_unit_operation()
|
@is_unit_operation(exclude=["unsubscribe"])
|
||||||
def domain_remove(operation_logger, domain, remove_apps=False, force=False, unsubscribe=None, no_unsubscribe=False):
|
def domain_remove(operation_logger, domain, remove_apps=False, force=False, unsubscribe=None, no_unsubscribe=False):
|
||||||
"""
|
"""
|
||||||
Delete domains
|
Delete domains
|
||||||
|
|
|
@ -106,7 +106,6 @@ def dyndns_subscribe(operation_logger, domain=None, password=None):
|
||||||
is_password=True,
|
is_password=True,
|
||||||
confirm=True
|
confirm=True
|
||||||
)
|
)
|
||||||
operation_logger.data_to_redact.append(password)
|
|
||||||
assert_password_is_strong_enough("admin", password)
|
assert_password_is_strong_enough("admin", password)
|
||||||
|
|
||||||
if not is_subscribing_allowed():
|
if not is_subscribing_allowed():
|
||||||
|
@ -218,7 +217,6 @@ def dyndns_unsubscribe(operation_logger, domain, password=None):
|
||||||
m18n.n("ask_password"),
|
m18n.n("ask_password"),
|
||||||
is_password=True
|
is_password=True
|
||||||
)
|
)
|
||||||
operation_logger.data_to_redact.append(password)
|
|
||||||
assert_password_is_strong_enough("admin", password)
|
assert_password_is_strong_enough("admin", password)
|
||||||
|
|
||||||
operation_logger.start()
|
operation_logger.start()
|
||||||
|
|
|
@ -180,12 +180,11 @@ def _detect_virt():
|
||||||
return out.split()[0]
|
return out.split()[0]
|
||||||
|
|
||||||
|
|
||||||
@is_unit_operation()
|
@is_unit_operation(exclude=["subscribe","password"])
|
||||||
def tools_postinstall(
|
def tools_postinstall(
|
||||||
operation_logger,
|
operation_logger,
|
||||||
domain,
|
domain,
|
||||||
password,
|
password,
|
||||||
ignore_dyndns=False,
|
|
||||||
subscribe=None,
|
subscribe=None,
|
||||||
no_subscribe=False,
|
no_subscribe=False,
|
||||||
force_password=False,
|
force_password=False,
|
||||||
|
|
Loading…
Add table
Reference in a new issue