]> git.proxmox.com Git - pve-cluster.git/commitdiff
fix #4937: notify: write configuration files in utf8 encoding
authorLukas Wagner <l.wagner@proxmox.com>
Wed, 30 Aug 2023 12:37:54 +0000 (14:37 +0200)
committerFiona Ebner <f.ebner@proxmox.com>
Mon, 11 Sep 2023 11:43:55 +0000 (13:43 +0200)
Strings that are returned from the Rust implementation are encoded as
utf8. To avoid issues with certain special characters (e.g. german
umlauts), we also need to explicitly store the configuration files in
utf8 encoding.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
[FE: use flag parameter instead of encoding as a string]
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
src/PVE/Notify.pm

index 046436202c19050babd8d82977ead076922983a6..419bf6dce16e5656eeca7036c651d207f962a1b3 100644 (file)
@@ -79,8 +79,8 @@ sub write_config {
     };
 
     my ($config, $priv_config) = $notification_config->write_config();
-    cfs_write_file('notifications.cfg', $config);
-    cfs_write_file('priv/notifications.cfg', $priv_config);
+    cfs_write_file('notifications.cfg', $config, 1);
+    cfs_write_file('priv/notifications.cfg', $priv_config, 1);
 }
 
 sub default_target {