[pve-devel] [PATCH manager 2/2] api: node: index: Add regex pattern to fingerprint parameter

Maximiliano Sandoval m.sandoval at proxmox.com
Wed Oct 30 13:18:44 CET 2024


This is the same regex as used in pmg-api.

Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
The commit message assumes https://lists.proxmox.com/pipermail/pmg-devel/2024-October/003003.html.

 PVE/API2/Nodes.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
index 1db148af..3aca8557 100644
--- a/PVE/API2/Nodes.pm
+++ b/PVE/API2/Nodes.pm
@@ -2569,6 +2569,7 @@ __PACKAGE__->register_method ({
 		ssl_fingerprint => {
 		    description => "The SSL SHA-256 fingerprint for the node certificate.",
 		    type => 'string',
+		    pattern => '^(:?[A-F0-9][A-F0-9]:){31}[A-F0-9][A-F0-9]$',
 		    optional => 1,
 		},
 	    },
-- 
2.39.5





More information about the pve-devel mailing list