From: Shannon Sterz <s.sterz@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox] auth-api: remove ticket info in old create ticket endpoint
Date: Fri, 16 May 2025 15:11:22 +0200 [thread overview]
Message-ID: <20250516131122.276231-1-s.sterz@proxmox.com> (raw)
this should make the endpoint behave closer to how it behaved before
the HttpOnly changes. the `ticket_info` field is superfluous anyway,
as the response also includes the proper ticket in this case already.
Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
this came to light when Dietmar tried to use the new proxmox-yew-comp
client for authenticating against PBS. the client would default to the
new HttpOnly cookie there as it say the response contained the
ticket_info field. however, that is wrong, the old api endpoint should
not have returned this additional info, so remove it here again.
proxmox-auth-api/src/api/access.rs | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/proxmox-auth-api/src/api/access.rs b/proxmox-auth-api/src/api/access.rs
index 396935f5..95f36f53 100644
--- a/proxmox-auth-api/src/api/access.rs
+++ b/proxmox-auth-api/src/api/access.rs
@@ -60,7 +60,13 @@ pub async fn create_ticket(
.downcast_ref::<RestEnvironment>()
.ok_or_else(|| format_err!("detected wrong RpcEnvironment type"))?;
- handle_ticket_creation(create_params, env).await
+ handle_ticket_creation(create_params, env)
+ .await
+ // remove the superfluous ticket_info to not confuse clients
+ .map(|mut info| {
+ info.ticket_info = None;
+ info
+ })
}
pub const API_METHOD_LOGOUT: ApiMethod = ApiMethod::new(
--
2.39.5
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next reply other threads:[~2025-05-16 13:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-16 13:11 Shannon Sterz [this message]
2025-05-20 8:11 ` [pbs-devel] applied: " Dietmar Maurer
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=20250516131122.276231-1-s.sterz@proxmox.com \
--to=s.sterz@proxmox.com \
--cc=pbs-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox