summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-08-23 11:46:54 +0200
committerChristian Poessinger <christian@poessinger.com>2021-08-23 11:46:56 +0200
commit31c97abb63c7223e224c399a7d474f012ecf8a45 (patch)
treea034052147c221a8a971cf7cf2f4922e727e72b3 /interface-definitions
parent461e3e1b47813d808bf22c9f8e2d8d8fb427fac2 (diff)
downloadvyos-1x-31c97abb63c7223e224c399a7d474f012ecf8a45.tar.gz
vyos-1x-31c97abb63c7223e224c399a7d474f012ecf8a45.zip
containers: T2216: add environmnet variable constraint
An environment variable passed to podman can only consist out of alphanumeric characters, a hypend and an underscore.
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/containers.xml.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/interface-definitions/containers.xml.in b/interface-definitions/containers.xml.in
index 124b1f65e..29762c171 100644
--- a/interface-definitions/containers.xml.in
+++ b/interface-definitions/containers.xml.in
@@ -25,6 +25,10 @@
<tagNode name="environment">
<properties>
<help>Add custom environment variables</help>
+ <constraint>
+ <regex>^[-_a-zA-Z0-9]+$</regex>
+ </constraint>
+ <constraintErrorMessage>Environment variable name must be alphanumeric and can contain hyphen and underscores</constraintErrorMessage>
</properties>
<children>
<leafNode name="value">