Skip to content

Stdlib::Fqdn type accepts ipv4 addresses, also allows truncated addresses #1282

Description

@canihavethisone

Describe the Bug

Specifying a variable as type Stdlib::Fqdn allows ipv4 addresses. This issue is compounded when using Stdlib::Host as with the inclusion of Fqdn it allows truncated ipv4 addresses such as 10.10.10.10.10.

Expected Behavior

IPv4 addresses should be validated when using Stdlib::Host and not accepted within the Stdlib:Fqdn type

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create a variable with type Stdlib::Fqdn

  2. Submit valid or truncated ipv4 address, which passes (the regex)

  3. Create a variable with type Stdlib::Host

  4. Submit a truncated ipv4 address, which passes (the regex)

Environment

  • stdlib v8.4.0
  • Puppet 6x

Additional Context

Unsure if this is a flaw in catering for numerical fqdn's, and how it can be addressed. TL:DR is that using Stdlib::Host does not ensure ipv4 addresses are valid

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    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