Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ app.use((err: unknown, req: Request, res: Response, next: NextFunction) => {
}
next(err);
});
app.use(express.json());
app.use(express.json({ limit: '1mb' }));

// Sandbox mode detection (before versioning)
app.use(sandboxMiddleware);
Expand Down
2 changes: 1 addition & 1 deletion backend/src/middleware/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export function verifyJwt(token: string): { publicKey: string } | null {
.digest();
if (!crypto.timingSafeEqual(Buffer.from(sig, 'base64url'), expected)) return null;
const payload = JSON.parse(Buffer.from(body, 'base64url').toString());
if (payload.exp < Math.floor(Date.now() / 1000)) return null;
if (typeof payload.exp !== 'number' || payload.exp < Math.floor(Date.now() / 1000)) return null;
return { publicKey: payload.sub };
} catch {
return null;
Expand Down
1 change: 1 addition & 0 deletions frontend/src/hooks/useStreamEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export function useStreamEvents(
): UseStreamEventsReturn {
const {
streamIds = [],
// userPublicKeys = [],
subscribeToAll = false,
autoReconnect = true,
maxRetryDelay = 30000,
Expand Down
Loading