Skip to content

Domain Validator - International Domains #71

@piewTheD

Description

@piewTheD

I think that the domain validator does not word for all cases of international domains, eg. thepiratebay.xn--fiqs8s is a working domain but the validator says it is invalid.

I located a fix in the code I believe should fix the issue - in the regex pattern:

pattern = re.compile(
r'^(([a-zA-Z]{1})|([a-zA-Z]{1}[a-zA-Z]{1})|'
r'([a-zA-Z]{1}[0-9]{1})|([0-9]{1}[a-zA-Z]{1})|'
r'([a-zA-Z0-9][-_.a-zA-Z0-9]{0,61}[a-zA-Z0-9])).'
r'([a-zA-Z]{2,13}|[a-zA-Z0-9-]{2,30}.[a-zA-Z0-9]{2,3})$'
)

Cheers

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