Design Store: moderation queue and stricter CSS check (S4, S13)

New submissions are "pending" until approved by the STORE_ADMIN_TOKEN
holder via the new /api/store/admin review page (CSS shown as text only).
Theme CSS is normalized (comments, escapes, case) before checking and may
no longer load anything: no @import/@font-face, no image-set()/src()/etc.,
url() only for inline data: images. Already-approved themes failing the
new check are hidden. Store file is written atomically.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
This commit is contained in:
MoepchiandClaude Opus 5.5 committed 2026-09-27 19:01:53 +00:00
1 parent b87eb0f4b7
commit 57447fdd11
8 files changed
+179 -34

No files matched your search

+5 -1
View File
@@ -426,7 +426,11 @@ const requestHandler = (req: IncomingMessage, res: ServerResponse) => {
await handleBroadcast(req, res);
return;
}
if (requestUrl.pathname === "/api/store/themes" || requestUrl.pathname.startsWith("/api/store/themes/")) {
if (
requestUrl.pathname === "/api/store/admin" ||
requestUrl.pathname === "/api/store/themes" ||
requestUrl.pathname.startsWith("/api/store/themes/")
) {
await handleStore(req, res, requestUrl.pathname);
return;
}