mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 10:33:01 +00:00
patched security holes
This commit is contained in:
@@ -35,6 +35,10 @@ export const withAuth = <T extends BunRequest>(handler: AuthedRouteHandler<T>):
|
||||
return new Response("Session expired", { status: 401 });
|
||||
}
|
||||
|
||||
if (session.userId !== userId) {
|
||||
return new Response("Invalid session", { status: 401 });
|
||||
}
|
||||
|
||||
return handler(
|
||||
Object.assign(req, {
|
||||
userId,
|
||||
|
||||
Reference in New Issue
Block a user