From 400f2b8d71d9a6edc6b201b563fbe77ed488c5a7 Mon Sep 17 00:00:00 2001 From: hugocasa Date: Wed, 2 Dec 2026 14:50:09 +0100 Subject: [PATCH] fix: withhold a run's token from a reader who presents a share token Co-Authored-By: Claude Opus 5.5 --- backend/windmill-api/src/jobs.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/windmill-api/src/jobs.rs b/backend/windmill-api/src/jobs.rs index 3ecae81c7e..69d5007f2f 100644 --- a/backend/windmill-api/src/jobs.rs +++ b/backend/windmill-api/src/jobs.rs @@ -2569,8 +2569,9 @@ async fn get_job( ) .await?; // Not for an approval link or a public share, which reach the run without the - // read access the token's identity belongs behind. - if opt_authed.is_some() { + // read access the token's identity belongs behind. A share's view token also admits + // a signed-in member the check above would otherwise refuse. + if opt_authed.is_some() && view_token.is_none() { job.fetch_token_origin(&db).await?; } }