cephconfig: escape un-escaped comment literals on write
in order to prevent configuration errors or the configuration being misinterpreted. Signed-off-by: Max Carrara <m.carrara@proxmox.com> Tested-by: Friedrich Weber <f.weber@proxmox.com>
This commit is contained in:
committed by
Fabian Grünbichler
parent
d93f8aea9d
commit
ad6bcc9e00
@ -105,6 +105,9 @@ sub write_ceph_config {
|
||||
$cond_write_sec->($re);
|
||||
}
|
||||
|
||||
# Escape comment literals that aren't escaped already
|
||||
$out =~ s/(?<!\\)([;#])/\\$1/gm;
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user