mirror of
https://github.com/r4sas/py-i2phosts
synced 2025-01-22 20:44:55 +00:00
web/lib/validation.py: disallow *b32.i2p and *b64.i2p
This commit is contained in:
parent
a475034cc4
commit
f34a78c9ab
@ -51,7 +51,7 @@ def validate_hostname(data):
|
||||
if re.search(r'(?<!^xn)--', namepart) and re.search(r'(?<!\.xn)--', namepart):
|
||||
raise forms.ValidationError('Hostname contain "--" and it\'s not an IDN')
|
||||
# Certain hostnames reserved for project use are not allowed
|
||||
if re.search(r'(^|\.)(proxy|router|console)$', namepart):
|
||||
if re.search(r'(^|\.)(proxy|router|console|b32|b64)$', namepart):
|
||||
raise forms.ValidationError('Trying to use reserved hostname')
|
||||
return data
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user