security improvements

This commit is contained in:
2025-10-07 13:39:53 -04:00
parent a4aca9c99d
commit 329becfb08
11 changed files with 287 additions and 35 deletions

View File

@@ -1,8 +1,8 @@
import { getAuthCookie, clearAuthCookie } from '~/server/utils/auth'
import { getSessionUsername, clearAuthCookie } from '~/server/utils/auth'
import { getUserByUsername } from '~/server/utils/database'
export default defineEventHandler(async (event) => {
const username = getAuthCookie(event)
const username = await getSessionUsername(event)
if (!username) {
return {