mirror of
				https://github.com/eduardogsilva/wireguard_webadmin.git
				synced 2025-10-31 18:46:17 +00:00 
			
		
		
		
	Merge pull request #40 from teohz/regex_fix
Expand domain length from 6 to 18 characters
This commit is contained in:
		| @@ -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 | ||||||
|      |      | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user