Bind share link sessions to the token's own resource

This commit is contained in:
miloschwartz
2026-08-17 14:24:21 -04:00
parent c05d2aeafb
commit 0a8b5e46ca
5 changed files with 63 additions and 128 deletions
+8
View File
@@ -164,6 +164,14 @@ export async function exchangeSession(
)
.limit(1);
if (res) {
if (res.resourceId !== resource.resourceId) {
return next(
createHttpError(
HttpCode.UNAUTHORIZED,
"Invalid request token"
)
);
}
await createResourceSession({
token,
resourceId: resource.resourceId,