fix: withhold a run's token from a reader who presents a share token

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
hugocasa
2026-12-02 14:50:09 +01:00
co-authored by Claude Opus 5.5
parent 27f16bc064
commit 400f2b8d71
+3 -2
View File
@@ -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?;
}
}