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:
@@ -2417,8 +2417,8 @@ class ProxmoxClient:
|
|||||||
params['password'] = password
|
params['password'] = password
|
||||||
|
|
||||||
if ssh_public_keys:
|
if ssh_public_keys:
|
||||||
import urllib.parse
|
# proxmoxer URL-encodes params automatically; pass key as-is
|
||||||
params['ssh-public-keys'] = urllib.parse.quote(ssh_public_keys, safe='')
|
params['ssh-public-keys'] = ssh_public_keys.strip()
|
||||||
|
|
||||||
if net0:
|
if net0:
|
||||||
params['net0'] = net0
|
params['net0'] = net0
|
||||||
|
|||||||
Reference in New Issue
Block a user