Remove two characters TLDs constraint in hostname validation. Empty labels are still forbidden.

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2024-03-28 10:25:12 +01:00
parent b20df82ae2
commit daf5eb8934
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD
1 changed files with 0 additions and 6 deletions

View File

@ -94,12 +94,6 @@ inline bool __attribute__((pure)) valid_domain(const char *domain, const size_t
if(domain[last_dot + 1] == '-' || domain[len - 1] == '-')
return false;
// TLD length check
// The last label must be at least 2 characters long
// (len-1) because we start counting from zero
if((len - 1) - last_dot < 2)
return false;
return true;
}