mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-19 02:32:56 +02:00
Bind share link sessions to the token's own resource
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user