mirror of
https://github.com/proxmoxer/proxmoxer.git
synced 2026-04-25 07:06:00 +03:00
[GH-ISSUE #153] Parameter verification failed: 'sshkeys' VM config option HTTP query argument is improperly escaped. #80
Labels
No labels
backend:https
backend:local
backend:openssh
backend:ssh_paramiko
pull-request
status:ansible-issue
status:help-wanted
status:info-needed
status:proxmox-issue
status:review-needed
type:bug 🐞
type:dependency ⛓️
type:docs 📝
type:enhancement ⏫
type:maintenance 🛠️
type:meta
type:question ❓
type:request ✋
type:testing 🧪
version:1.x
version:latest
version:py2
version:py3
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmoxer#80
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @aznashwan on GitHub (Jan 11, 2024).
Original GitHub issue: https://github.com/proxmoxer/proxmoxer/issues/153
When updating a VM's config with the
sshkeysoption, the HTTP query argument is encoded as a query arg usingurllib.parse.quote_plus(), which is NOT accepted by the server.Repro snipped:
Error:
Note that, in the error, the key LOOKS like it reached the server correctly, but the error occurs nonetheless.
I suspect the
/in my key is what's tripping the server up.Debugging request query args:
After turning on debugging at the requests level, it looks like the actual query arg is
urllib.parse.quote_plus()'d:PUT request by Proxmoxer which errors:
PUT request as sent from the PVE Web UI (inspected from Safari FWIW)
Workaround:
Conclusion
While I do NOT believe that this warrants hacking core.py just for special treatment of the
sshkeysarg, I think it's important for this issue to be documented somewhere.@morph027 commented on GitHub (Jan 11, 2024):
Jip, good catch. Stumbled upon the same some time ago 🙈
https://gitlab.com/morph027/pve-cloud-init-creator/-/blob/master/pve_cloud_init_creator.py?ref_type=heads#L362
@aznashwan commented on GitHub (Jan 12, 2024):
Ah sorry to hear, but glad to know I wasn't the first person to ever bang my head against this arg. 😆
I guess a maintainer could mark this issue as "avoidable" and/or close it as they see fit.
Thank you and the rest of the contributors to this nice lib btw!
@jhollowe commented on GitHub (Jan 20, 2024):
If you would be willing, could you add this to the documentation?
@aznashwan commented on GitHub (Jan 23, 2024):
@jhollowe apologies for the delay, I've been quite busy with other stuff, but finally managed to do a write-up which you can find at: https://github.com/proxmoxer/docs/pull/4
@Torxed commented on GitHub (Mar 7, 2024):
It would be convenient if proxmoxer could take a list of strings rather than us having to figure out this error, as it's pretty non-descriptive from proxmox. And most issue-post in the forums will claim it's the trailing
\nthat is the issue (and the error message does contain one after the ssh key). Took a while to get to this issue and to figure outsafe=''was the winning strategy.