mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
pagekite: Don't announce unconfigured kite as a valid domain
Closes: #1891. As soon as the app is installed, the default configuration has NAME.pagekite.me. This is incorrectly announced as a valid domain to the system. Avoid this behavior by never announcing this default configured kite name. Tests: - Install Pagekite. Observe that the default kite name is not announced as a domain (confirmed in Name Services). With the patch, it will. - Change the domain to anything other than default. It is announced. LE tries to obtain cert. Name Services list the domain. - Change the domain back to default kite name. It is not announced. Old domain is removed. - Start FreedomBox with Pagekite configured with default domain. It is not announced. - Start FreedomBox with Pagekite configured with non-default domain. It is announced. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
e9559b2d0d
commit
ec5f994068
@ -20,6 +20,9 @@ KITE_SECRET = '@kitesecret'
|
|||||||
# Augeas base path for Pagekite configuration files
|
# Augeas base path for Pagekite configuration files
|
||||||
CONF_PATH = '/files/etc/pagekite.d'
|
CONF_PATH = '/files/etc/pagekite.d'
|
||||||
|
|
||||||
|
# Kite name used by default in config. Should be treated as unconfigured.
|
||||||
|
UNCONFIGURED_KITE = 'NAME.pagekite.me'
|
||||||
|
|
||||||
# Parameters that get stored in configuration service_on entries
|
# Parameters that get stored in configuration service_on entries
|
||||||
SERVICE_PARAMS = [
|
SERVICE_PARAMS = [
|
||||||
'protocol', 'kitename', 'backend_host', 'backend_port', 'secret'
|
'protocol', 'kitename', 'backend_host', 'backend_port', 'secret'
|
||||||
@ -178,7 +181,7 @@ def update_names_module(is_enabled=None):
|
|||||||
service for service, value in config['predefined_services'].items()
|
service for service, value in config['predefined_services'].items()
|
||||||
if value
|
if value
|
||||||
]
|
]
|
||||||
if config['kite_name']:
|
if config['kite_name'] and config['kite_name'] != UNCONFIGURED_KITE:
|
||||||
domain_added.send_robust(sender='pagekite',
|
domain_added.send_robust(sender='pagekite',
|
||||||
domain_type='domain-type-pagekite',
|
domain_type='domain-type-pagekite',
|
||||||
name=config['kite_name'],
|
name=config['kite_name'],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user