fix(lxc): remove double URL-encoding of SSH public keys

proxmoxer URL-encodes parameters automatically. The extra urllib.parse.quote()
call was double-encoding SSH keys, causing Proxmox to reject them with
'500 Internal Server Error: SSH public key validation error'.

Now passes the SSH key as-is (only stripped of whitespace), letting proxmoxer
handle encoding.
This commit is contained in:
markmorado
2026-05-06 19:55:25 +02:00
parent 1cf099ba1d
commit 5d905361b6

View File

@@ -2417,8 +2417,8 @@ class ProxmoxClient:
params['password'] = password
if ssh_public_keys:
import urllib.parse
params['ssh-public-keys'] = urllib.parse.quote(ssh_public_keys, safe='')
# proxmoxer URL-encodes params automatically; pass key as-is
params['ssh-public-keys'] = ssh_public_keys.strip()
if net0:
params['net0'] = net0