Hey,
I don't know if this is really an issue, but according to RFC1035 section 2.3.4 (https://www.freesoft.org/CIE/RFC/1035/9.htm) , FQDN cannot be longer than 253 octets.
See also: https://devblogs.microsoft.com/oldnewthing/?p=7873
Idk if this is intentional but the actual behavior of validators.domain return True even if the FQDN is too long.
Step to reproduce:
- Install the latest version of validators
- Run the following code
a = "www.abcdefghijklmnop.abcdefghijklmnop.abcdefghijklmnop.abcdefghijklmnop.abcdefghijklmnop.abcdefghijklmnop.abcdefghijklmnop.abcdefghijklmnop.abcdefghijklmnop.abcdefghijklmnop.abcdefghijklmnop.abcdefghijklmnop.abcdefghijklmnop.abcdefghijklmnop.abcdefghijklmnop.fr"
print(len(a)) # 261
print(validators.domain(a)) # True
Expected behavior:
The method must return False
Actual behavior:
The method return True
Hey,
I don't know if this is really an issue, but according to RFC1035 section 2.3.4 (https://www.freesoft.org/CIE/RFC/1035/9.htm) , FQDN cannot be longer than 253 octets.
See also: https://devblogs.microsoft.com/oldnewthing/?p=7873
Idk if this is intentional but the actual behavior of validators.domain return True even if the FQDN is too long.
Step to reproduce:
Expected behavior:
The method must return False
Actual behavior:
The method return True