Skip to content

domain validator validates domain with double dots. #45

@erpel

Description

@erpel
$ python
Python 2.7.5 (default, Nov  6 2016, 00:28:07) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import validators

>>> print validators.__version__
0.11.2
>>> validators.domain("ietf..org")
ValidationFailure(func=domain, args={'value': 'ietf..org'})
>>> validators.domain("www..ietf.org")
True
>>> 
$ host www..ietf.org
host: 'www..ietf.org' is not a legal name (unexpected end of input)
$ dig www..ietf.org
dig: 'www..ietf.org' is not a legal name (unexpected end of input)

Double dots, which seem to be illegal in dns names [1], are not rejected unless they are between the last two labels.

[1] RFC 1912:

DNS domain names consist of "labels" separated by single dots.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions