diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-04-20 19:34:39 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-04-20 19:36:39 +0200 |
commit | 5119af40aac0ed10aa0aafb1d60b8dd0861607cc (patch) | |
tree | 1c003b6ef37b92c4a660f8aea7c8f054dc6aace1 /interface-definitions/include/interface | |
parent | ff7b2b0e62510ef8de28c9c4bfa34badeabec775 (diff) | |
download | vyos-1x-5119af40aac0ed10aa0aafb1d60b8dd0861607cc.tar.gz vyos-1x-5119af40aac0ed10aa0aafb1d60b8dd0861607cc.zip |
interfaces: T3488: harden regex for supplied address string
The previously used regex allowed an address value of "dhcpfoo" which is invalid
and will raise an OSError. Harden the regex that it explicitly must be dhcp or
dhcpv6.
(cherry picked from commit dd4c60c1c3423f02457bc1dcc25e36d03d537a5f)
Diffstat (limited to 'interface-definitions/include/interface')
-rw-r--r-- | interface-definitions/include/interface/address-ipv4-ipv6-dhcp.xml.i | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/interface-definitions/include/interface/address-ipv4-ipv6-dhcp.xml.i b/interface-definitions/include/interface/address-ipv4-ipv6-dhcp.xml.i index b9dd59bea..123590c08 100644 --- a/interface-definitions/include/interface/address-ipv4-ipv6-dhcp.xml.i +++ b/interface-definitions/include/interface/address-ipv4-ipv6-dhcp.xml.i @@ -23,7 +23,7 @@ </valueHelp> <constraint> <validator name="ip-host"/> - <regex>(dhcp|dhcpv6)</regex> + <regex>^(dhcp|dhcpv6)$</regex> </constraint> <multi/> </properties> |