mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-01 00:42:49 +08:00
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:
1 parent
b87eb0f4b7
commit
57447fdd11
8 files changed
+179
-34
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user