all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Shan Shaji <s.shaji@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [PATCH datacenter-manager] ui: remove URL encoding from token ID during creation
Date: Tue, 26 May 2026 14:59:12 +0200	[thread overview]
Message-ID: <20260526125912.454182-1-s.shaji@proxmox.com> (raw)

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





             reply	other threads:[~2026-05-26 13:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26 12:59 Shan Shaji [this message]
2026-05-26 13:52 ` applied: [PATCH datacenter-manager] ui: remove URL encoding from token ID during creation Lukas Wagner

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=20260526125912.454182-1-s.shaji@proxmox.com \
    --to=s.shaji@proxmox.com \
    --cc=pdm-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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal