mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #10] [MERGED] Fix crypto API, XSS, CSS import order, heading regex, installer, Workbox pattern, and timer leak #4390
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#4390
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/10
Author: @Copilot
Created: 3/10/2026
Status: ✅ Merged
Merged: 3/10/2026
Merged by: @SpicyMarinara
Base:
release/1.3.0← Head:copilot/sub-pr-9📝 Commits (2)
8283e3bInitial plan6116f41Fix all review issues: crypto, XSS, CSS import, heading regex, bat installer, Workbox pattern, timer cleanup📊 Changes
6 files changed (+69 additions, -14 deletions)
View changed files
📝
installer/install.bat(+25 -1)📝
packages/client/src/components/agents/AgentEditor.tsx(+27 -5)📝
packages/client/src/styles/globals.css(+1 -1)📝
packages/client/vite.config.ts(+1 -1)📝
packages/server/src/routes/generate.routes.ts(+2 -2)📝
packages/server/src/routes/spotify-auth.routes.ts(+13 -4)📄 Description
Addresses 8 issues flagged in code review across the Spotify OAuth flow, prompt injection dedup, PWA config, and the Windows installer.
Security
crypto.randomBytesinstead ofcrypto.getRandomValues—getRandomValuesis WebCrypto; unavailable on the Nodecryptomodule and would throw at runtime.error,tokenRes.status,body,err.message) are now passed throughhtmlEscape().Correctness
wrapContent(…, depth=1)emits### Namebut the duplicate check was testing`# ${name}`. Replaced withnew RegExp(^#{1,6} ${escapedName}, "m")to match any heading level and names with special chars.urlPattern— regex/^\/api\//never matches absolute URLs in the service worker context. Replaced with a function matcher:@importordering —@import "./themes/sillytavern.css"was at line ~1303, after thousands of style rules, making it invalid/ignored. Moved to the top, immediately after@import "tailwindcss".Installer (
install.bat)set /p INSTALL_DIR=…clears the variable when the user presses Enter. Fixed using a tempUSER_INPUTvariable.NODE_MAJORwas extracted but never checked. Added an explicit< 20guard with a descriptive error and early exit.React timer leak (
AgentEditor)setInterval/setTimeoutwith no cleanup. Timer IDs are now stored inuseRef, cleared in auseEffectreturn, and reset before starting a new poll to prevent stale callbacks after unmount or repeated clicks.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.