Choose an account to authorize:
{props.accountOwners.map((accountOwner, i) => { const accountName = renderCustomEmojis( - Bun.escapeHTML(accountOwner.account.name), + escape(accountOwner.account.name), accountOwner.account.emojis, ); return ( diff --git a/src/pages/home/index.tsx b/src/pages/home/index.tsx index 30055b73..bd3b8575 100644 --- a/src/pages/home/index.tsx +++ b/src/pages/home/index.tsx @@ -1,3 +1,4 @@ +import { escape } from "es-toolkit"; import { Hono } from "hono"; import { Layout } from "../../components/Layout.tsx"; import db from "../../db.ts"; @@ -32,7 +33,7 @@ homePage.get("/", async (c) => { {owners.map((owner) => { const url = owner.account.url ?? owner.account.iri; const nameHtml = renderCustomEmojis( - Bun.escapeHTML(owner.account.name), + escape(owner.account.name), owner.account.emojis, ); const bioHtml = renderCustomEmojis( diff --git a/src/pages/login.tsx b/src/pages/login.tsx index e6e6007b..336ff163 100644 --- a/src/pages/login.tsx +++ b/src/pages/login.tsx @@ -1,4 +1,5 @@ import { zValidator } from "@hono/zod-validator"; +import { verify } from "argon2"; import { eq } from "drizzle-orm"; import { Hono } from "hono"; import { getSignedCookie, setSignedCookie } from "hono/cookie"; @@ -44,7 +45,7 @@ login.post("/", async (c) => { }); if ( credential == null || - !(await Bun.password.verify(password, credential.passwordHash, "argon2id")) + !(await verify(credential.passwordHash, password)) ) { return c.html(