config, dynamicdns, pagekite: Remove incorrect use of str

This was used before to ensure the domain name was ASCII. However, str
does not convert to ASCII in Python 3.

Note that in config module, which sets the system domain name, the
domain is already restricted to alphanumerics, hyphen, and period.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
James Valleroy authored and Veiko Aasa committed 2021-03-29 12:59:47 +03:00
1 parent 0b630037f9
commit 48d7f68ed5
3 files changed
+2 -13

No files matched your search

+1 -5
View File
@@ -67,12 +67,8 @@ class ConfigurationForm(forms.Form):
old = _filter(self.initial)
new = _filter(self.cleaned_data)
# Kite name should be ASCII. If it's unicode, convert to
# ASCII.
kite_name = str(new['kite_name'])
# Let's Encrypt certificate paths use lower-case kite name.
kite_name = kite_name.lower()
kite_name = new['kite_name'].lower()
if old != new:
frontend = f"{new['server_domain']}:{new['server_port']}"