* [pbs-devel] [PATCH proxmox] auth-api: remove ticket info in old create ticket endpoint
@ 2025-05-16 13:11 Shannon Sterz
2025-05-20 8:11 ` [pbs-devel] applied: " Dietmar Maurer
0 siblings, 1 reply; 2+ messages in thread
From: Shannon Sterz @ 2025-05-16 13:11 UTC (permalink / raw)
To: pbs-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pbs-devel] applied: [PATCH proxmox] auth-api: remove ticket info in old create ticket endpoint
2025-05-16 13:11 [pbs-devel] [PATCH proxmox] auth-api: remove ticket info in old create ticket endpoint Shannon Sterz
@ 2025-05-20 8:11 ` Dietmar Maurer
0 siblings, 0 replies; 2+ messages in thread
From: Dietmar Maurer @ 2025-05-20 8:11 UTC (permalink / raw)
To: Proxmox Backup Server development discussion, Shannon Sterz
applied
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-05-20 8:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-16 13:11 [pbs-devel] [PATCH proxmox] auth-api: remove ticket info in old create ticket endpoint Shannon Sterz
2025-05-20 8:11 ` [pbs-devel] applied: " Dietmar Maurer
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