diff options
author | hagbard <vyosdev@derith.de> | 2020-01-16 08:38:44 -0800 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-01-26 12:01:31 +0100 |
commit | ebfd8e5e6ef64f86291b28ad08225fb497c32655 (patch) | |
tree | 7c249734e035ecdffb3800d058e1fccf88a7ff55 | |
parent | a4dc6a695e5f303c475783ed79246a484f374f2c (diff) | |
download | vyos-1x-ebfd8e5e6ef64f86291b28ad08225fb497c32655.tar.gz vyos-1x-ebfd8e5e6ef64f86291b28ad08225fb497c32655.zip |
snmpd: T1964: forbid whitespace in script extension identifier
(cherry picked from commit 742da889afa4375d5b6cb98dada7f2d3ec2f0326)
-rw-r--r-- | interface-definitions/snmp.xml | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/interface-definitions/snmp.xml b/interface-definitions/snmp.xml index 821d1367d..fcc733c6c 100644 --- a/interface-definitions/snmp.xml +++ b/interface-definitions/snmp.xml @@ -585,16 +585,24 @@ <tagNode name="extension-name"> <properties> <help>Extension name</help> + <constraint> + <regex>^[a-z0-9\.\-\_]+</regex> + </constraint> + <constraintErrorMessage>Script extension contains invalid characters</constraintErrorMessage> </properties> <children> <leafNode name="script"> - <properties> - <help>Script location and name</help> - <completionHelp> - <script>ls /config/user-data</script> - </completionHelp> - </properties> - </leafNode> + <properties> + <help>Script location and name</help> + <completionHelp> + <script>ls /config/user-data</script> + </completionHelp> + <constraint> + <regex>^[a-z0-9\.\-\_\/]+</regex> + </constraint> + <constraintErrorMessage>Script extension contains invalid characters</constraintErrorMessage> + </properties> + </leafNode> </children> </tagNode> </children> |