mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
config: Convert entered domain name to lower case
Domain name is not case sensitive, but Let's Encrypt certificate paths use lower-case domain name. Closes: #1964. Tests: Config functional tests passed. Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
parent
adae894362
commit
043b329e7d
@ -15,6 +15,10 @@ Scenario: Change domain name
|
|||||||
When I change the domain name to mydomain.example
|
When I change the domain name to mydomain.example
|
||||||
Then the domain name should be mydomain.example
|
Then the domain name should be mydomain.example
|
||||||
|
|
||||||
|
Scenario: Capitalized domain name
|
||||||
|
When I change the domain name to Mydomain.example
|
||||||
|
Then the domain name should be mydomain.example
|
||||||
|
|
||||||
Scenario: Change webserver home page
|
Scenario: Change webserver home page
|
||||||
Given the syncthing application is installed
|
Given the syncthing application is installed
|
||||||
And the syncthing application is enabled
|
And the syncthing application is enabled
|
||||||
|
|||||||
@ -120,6 +120,10 @@ def set_domainname(domainname, old_domainname):
|
|||||||
# Domain name should be ASCII. If it's unicode, convert to ASCII.
|
# Domain name should be ASCII. If it's unicode, convert to ASCII.
|
||||||
domainname = str(domainname)
|
domainname = str(domainname)
|
||||||
|
|
||||||
|
# Domain name is not case sensitive, but Let's Encrypt certificate
|
||||||
|
# paths use lower-case domain name.
|
||||||
|
domainname = domainname.lower()
|
||||||
|
|
||||||
LOGGER.info('Changing domain name to - %s', domainname)
|
LOGGER.info('Changing domain name to - %s', domainname)
|
||||||
actions.superuser_run('domainname-change', [domainname])
|
actions.superuser_run('domainname-change', [domainname])
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user