[pve-devel] [PATCH v2 storage 4/7] schema: anchor regex for 'pve-storage-format'

Fiona Ebner f.ebner at proxmox.com
Wed Mar 5 11:49:20 CET 2025


Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 src/PVE/Storage/Plugin.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
index 79f6f08..dfdab16 100644
--- a/src/PVE/Storage/Plugin.pm
+++ b/src/PVE/Storage/Plugin.pm
@@ -346,7 +346,7 @@ PVE::JSONSchema::register_format('pve-storage-format', \&verify_format);
 sub verify_format {
     my ($fmt, $noerr) = @_;
 
-    if ($fmt !~ m/(raw|qcow2|vmdk|subvol)/) {
+    if ($fmt !~ m/^(raw|qcow2|vmdk|subvol)$/) {
 	return undef if $noerr;
 	die "invalid format '$fmt'\n";
     }
-- 
2.39.5





More information about the pve-devel mailing list