Skip to content

Commit 48c51e6

Browse files
committed
Change Stdlib::Host to no longer accept subnets
A host should be a specific IP and not allow a subnet.
1 parent a01ed37 commit 48c51e6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

spec/type_aliases/host_spec.rb

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
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

+1-1
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)