domain dyndns: do not save recovery password

This commit is contained in:
axolotle 2023-09-27 19:31:50 +02:00
parent fc68f769f9
commit e9802ce2dc

View file

@ -317,11 +317,6 @@ def domain_add(
pass
raise e
if dyndns and dyndns_recovery_password:
domain_config_set(
domain, "dns.registrar.recovery_password", dyndns_recovery_password
)
hook_callback("post_domain_add", args=[domain])
logger.success(m18n.n("domain_created"))
@ -710,13 +705,14 @@ class DomainConfigPanel(ConfigPanel):
other_app=app_map(raw=True)[self.entity]["/"]["id"],
)
if (
"recovery_password" in self.future_values
and self.future_values["recovery_password"]
!= self.values["recovery_password"]
"recovery_password" in self.new_values
and self.new_values["recovery_password"]
):
domain_dyndns_set_recovery_password(
self.entity, self.future_values["recovery_password"]
self.entity, self.new_values["recovery_password"]
)
# Do not save password in yaml settings
del self.new_values["recovery_password"]
super()._apply()