From fc3191638439c4612f73aa58d24acd02cccd6148 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 20 Feb 2019 16:30:46 +0100 Subject: [PATCH] followup comment that we do not escape completely like systemd Signed-off-by: Thomas Lamprecht --- PVE/API2/Disks/Directory.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PVE/API2/Disks/Directory.pm b/PVE/API2/Disks/Directory.pm index 630d1cd..645c73c 100644 --- a/PVE/API2/Disks/Directory.pm +++ b/PVE/API2/Disks/Directory.pm @@ -90,6 +90,8 @@ my $write_ini = sub { sub systemd_escape { my ($val) = @_; + # NOTE: this is not complete, but enough for our needs. normally all + # characters which are not alpha-numerical, '.' or '_' would need escaping $val =~ s/\-/\\x2d/g; return $val; -- 2.39.2