public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH datacenter-manager] ui: remove URL encoding from token ID during creation
@ 2026-05-26 12:59 Shan Shaji
  2026-05-26 13:52 ` applied: " Lukas Wagner
  0 siblings, 1 reply; 2+ messages in thread
From: Shan Shaji @ 2026-05-26 12:59 UTC (permalink / raw)
  To: pdm-devel

When creating a new token via the UI, token IDs containing hyphens
("-") were URL-encoded. This caused the API request to fail
with a 400 Bad Request error, preventing the token from being
generated.

Fixed the issue by removing the unnecessary URL encoding from the
token ID before sending the request.

Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
 ui/src/remotes/auto_installer/token_panel.rs | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/ui/src/remotes/auto_installer/token_panel.rs b/ui/src/remotes/auto_installer/token_panel.rs
index 06aed7bc..f8d26451 100644
--- a/ui/src/remotes/auto_installer/token_panel.rs
+++ b/ui/src/remotes/auto_installer/token_panel.rs
@@ -384,12 +384,7 @@ async fn create_token(form_ctx: FormContext) -> Result<AnswerTokenCreateResult>
         proxmox_time::parse_rfc3339(&form_ctx.read().get_field_text("expire-at")).unwrap_or(0);
 
     Ok(pdm_client()
-        .add_autoinst_token(
-            &percent_encode_component(&id),
-            Some(comment),
-            Some(enable),
-            Some(expire),
-        )
+        .add_autoinst_token(&id, Some(comment), Some(enable), Some(expire))
         .await?)
 }
 
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-26 13:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-26 12:59 [PATCH datacenter-manager] ui: remove URL encoding from token ID during creation Shan Shaji
2026-05-26 13:52 ` applied: " Lukas Wagner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal