From: Thomas Lamprecht Date: Wed, 20 Feb 2019 15:30:46 +0000 (+0100) Subject: followup comment that we do not escape completely like systemd X-Git-Url: https://git.proxmox.com/?p=pve-storage.git;a=commitdiff_plain;h=fc3191638439c4612f73aa58d24acd02cccd6148;ds=sidebyside followup comment that we do not escape completely like systemd Signed-off-by: Thomas Lamprecht --- 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;