summaryrefslogtreecommitdiff
path: root/interface-definitions/interfaces_wireguard.xml.in
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-01-02 09:57:51 +0100
committerGitHub <noreply@github.com>2024-01-02 09:57:51 +0100
commitbd0bf3552542965eef2f4e5129d7703798a09e71 (patch)
tree76c9d9209603a457e47d98d1e2a2e503fdb05de4 /interface-definitions/interfaces_wireguard.xml.in
parentc89b091cd7b36412af7a8b45659b65ddf93bdaf5 (diff)
parentd5c8b7bb23b9ba52c8ecee582c0f7b067c10cabd (diff)
downloadvyos-1x-bd0bf3552542965eef2f4e5129d7703798a09e71.tar.gz
vyos-1x-bd0bf3552542965eef2f4e5129d7703798a09e71.zip
Merge pull request #2740 from vyos/mergify/bp/sagitta/pr-2739
T3642: add missing base64 CLI validators (backport #2739)
Diffstat (limited to 'interface-definitions/interfaces_wireguard.xml.in')
-rw-r--r--interface-definitions/interfaces_wireguard.xml.in12
1 files changed, 6 insertions, 6 deletions
diff --git a/interface-definitions/interfaces_wireguard.xml.in b/interface-definitions/interfaces_wireguard.xml.in
index f3fe0f1da..fba1064ef 100644
--- a/interface-definitions/interfaces_wireguard.xml.in
+++ b/interface-definitions/interfaces_wireguard.xml.in
@@ -44,9 +44,9 @@
<properties>
<help>Base64 encoded private key</help>
<constraint>
- <regex>[0-9a-zA-Z\+/]{43}=</regex>
+ <validator name="base64"/>
</constraint>
- <constraintErrorMessage>Key is not valid 44-character (32-bytes) base64</constraintErrorMessage>
+ <constraintErrorMessage>Key is not base64-encoded</constraintErrorMessage>
</properties>
</leafNode>
<tagNode name="peer">
@@ -64,18 +64,18 @@
<properties>
<help>base64 encoded public key</help>
<constraint>
- <regex>[0-9a-zA-Z\+/]{43}=</regex>
+ <validator name="base64"/>
</constraint>
- <constraintErrorMessage>Key is not valid 44-character (32-bytes) base64</constraintErrorMessage>
+ <constraintErrorMessage>Key is not base64-encoded</constraintErrorMessage>
</properties>
</leafNode>
<leafNode name="preshared-key">
<properties>
<help>base64 encoded preshared key</help>
<constraint>
- <regex>[0-9a-zA-Z\+/]{43}=</regex>
+ <validator name="base64"/>
</constraint>
- <constraintErrorMessage>Key is not valid 44-character (32-bytes) base64</constraintErrorMessage>
+ <constraintErrorMessage>Key is not base64-encoded</constraintErrorMessage>
</properties>
</leafNode>
<leafNode name="allowed-ips">