From: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-storage 1/2] fix #7360: esxi: store password file as utf-8
Date: Mon, 5 Oct 2026 12:55:22 +0200 [thread overview]
Message-ID: <20261005110306.2197624-2-a.bied-charreton@proxmox.com> (raw)
In-Reply-To: <20261005110306.2197624-1-a.bied-charreton@proxmox.com>
The password reaches esxi_set_credentials() as a Perl string, and
file_set_contents() wrote it without encoding it. For characters in the
U+0080 to U+00FF range, like 'é', this produced Latin-1 bytes. Both
listvms.py and the FUSE tool decode the pasword file as UTF-8, so
listing guests failed with a decode error.
Force UTF-8 encoding when writing the file. Existing storages with an
affected password need to have their password set again to rewrite the
file.
Link: https://bugzilla.proxmox.com/show_bug.cgi?id=7360
Signed-off-by: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
---
src/PVE/Storage/ESXiPlugin.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
index bc2e481..7defb7b 100644
--- a/src/PVE/Storage/ESXiPlugin.pm
+++ b/src/PVE/Storage/ESXiPlugin.pm
@@ -81,7 +81,7 @@ sub esxi_set_credentials {
my $cred_file = esxi_cred_file_name($storeid);
mkdir "/etc/pve/priv/storage";
- PVE::Tools::file_set_contents($cred_file, $password);
+ PVE::Tools::file_set_contents($cred_file, $password, 0600, 1);
return $cred_file;
}
--
2.47.3
next prev parent reply other threads:[~2026-10-05 11:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 10:55 [PATCH pve-storage 0/2] fix #7360: esxi: write password file as Arthur Bied-Charreton
2026-10-05 10:55 ` Arthur Bied-Charreton [this message]
2026-10-05 10:55 ` [PATCH pve-storage 2/2] esxi: rewrite non-UTF-8 password files Arthur Bied-Charreton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261005110306.2197624-2-a.bied-charreton@proxmox.com \
--to=a.bied-charreton@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.