Skip to content

Commit ff63a24

Browse files
ekohlskyamgarp
authored andcommitted
Change Stdlib::Host to no longer accept subnets
A host should be a specific IP and not allow a subnet.
1 parent da215cb commit ff63a24

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

spec/type_aliases/host_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
'bob@example.com',
3636
'%.example.com',
3737
'2001:0d8',
38+
'192.0.2.0/24',
39+
'2001:db8::/32',
3840
].each do |value|
3941
describe value.inspect do
4042
it { is_expected.not_to allow_value(value) }

types/host.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# @summary Validate a host (FQDN or IP address)
2-
type Stdlib::Host = Variant[Stdlib::Fqdn, Stdlib::IP::Address]
2+
type Stdlib::Host = Variant[Stdlib::Fqdn, Stdlib::IP::Address::Nosubnet]

0 commit comments

Comments
 (0)