fix(gateway): purify global notice HTML

This commit is contained in:
Hide_D committed 2026-07-31 16:47:26 +00:00
1 parent 1168813eb3
commit 864cbfc0d0
10 files changed
+299 -8

No files matched your search

+2 -1
View File
@@ -15,6 +15,7 @@ import { accountRouter } from './account/router.js';
import { resolveLocalAccountProfilePolicy } from './auth/localAccountPolicy.js';
import { openPassword, zDisplayName, zPasswordEnvelope, zRegistrationUsername } from './auth/registrationInput.js';
import { resolveEffectiveAccountIcon } from './auth/accountIconProjection.js';
import { purifyGatewayNoticeHtml } from './security/gatewayNoticeHtml.js';
const zUsername = z
.string()
@@ -51,7 +52,7 @@ export const appRouter = router({
const setting = await ctx.prisma.systemSetting.findUnique({
where: { id: 1 },
});
return setting?.notice ?? '';
return purifyGatewayNoticeHtml(setting?.notice);
}),
profiles: procedure
.input(