Updated regex in mark.pp
authorMichiel Brandenburg <apex@xepa.nl>
Wed, 21 Dec 2022 21:44:08 +0000 (22:44 +0100)
committerGitHub <noreply@github.com>
Wed, 21 Dec 2022 21:44:08 +0000 (22:44 +0100)
Now using debian policy manual as reference

manifests/mark.pp

index 492886d2eb007dae8f06512a94d281c0cf213b44..8aeca121bd71560d1b4edbe95c465255f3540bd6 100644 (file)
@@ -8,7 +8,7 @@
 define apt::mark (
   Enum['auto','manual','hold','unhold'] $setting,
 ) {
-  if $title !~ /^[a-zA-Z0-9\-_\.]+$/ {
+  if $title !~ /^[a-z0-9]{2}[a-z0-9.+\-]*$/ {
     fail("Invalid package name: ${title}")
   }