Prior to this commit, one of our updates (https://github.com/puppetlabs/puppetlabs-apt/pull/1052)
implemented a regex validation for ppa packages that were to be
installed. However, this validation did not account for resource
names that were dotted.
This commit aims to fix this bug in our validation process so that it
works as intended.
}
# Validate the resource name
}
# Validate the resource name
- if $name !~ /^ppa:([a-zA-Z0-9\-_]+)\/([a-zA-z0-9\-_\.]+)$/ {
+ if $name !~ /^ppa:([a-zA-Z0-9\-_.]+)\/([a-zA-z0-9\-_\.]+)$/ {
fail("Invalid PPA name: ${name}")
}
fail("Invalid PPA name: ${name}")
}
[
'ppa:foo!/bar',
'ppa:foo/bar!',
[
'ppa:foo!/bar',
'ppa:foo/bar!',
'ppa:foo/bar/foobar',
'|| ls -la ||',
'|| touch /tmp/foo.txt ||',
'ppa:foo/bar/foobar',
'|| ls -la ||',
'|| touch /tmp/foo.txt ||',