mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2025-08-07 11:45:08 +02:00
fix: changing top domain character length check from 6 to 18 characters - as seems to be the currently longest top domain name
This commit is contained in:
parent
7d44efcf75
commit
b91b30ccf7
1 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ def is_valid_ip_or_hostname(value):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Regex to check valid hostname (RFC 1123)
|
# Regex to check valid hostname (RFC 1123)
|
||||||
hostname_regex = r'^((?!-)[A-Za-z0-9-]{1,63}(?<!-)\.)+[A-Za-z]{2,6}$'
|
hostname_regex = r'^((?!-)[A-Za-z0-9-]{1,63}(?<!-)\.)+[A-Za-z]{2,18}$'
|
||||||
if re.match(hostname_regex, value):
|
if re.match(hostname_regex, value):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -33,4 +33,4 @@ def list_network_interfaces():
|
||||||
interface_name = parts[1].split('@')[0] # Remove qualquer coisa após '@'
|
interface_name = parts[1].split('@')[0] # Remove qualquer coisa após '@'
|
||||||
interfaces.append(interface_name)
|
interfaces.append(interface_name)
|
||||||
|
|
||||||
return interfaces
|
return interfaces
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue