mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8886] [MERGED] fix(server): close the open code scanning alerts before v2.5.2 #8861
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#8861
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/8886
Author: @SpicyMarinara
Created: 11/5/2026
Status: ✅ Merged
Merged: 11/5/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/v252-codeql-hardening📝 Commits (1)
5302ba0fix(server): keep two upload paths inside their folders and two text cleanups linear📊 Changes
4 files changed (+20 additions, -9 deletions)
View changed files
📝
packages/server/src/routes/characters.routes.ts(+5 -1)📝
packages/server/src/routes/sprites.routes.ts(+4 -3)📝
packages/server/src/services/image/image-generation.ts(+2 -1)📝
packages/shared/src/utils/sprite-labels.ts(+9 -4)📄 Description
Linked issue
Closes #8885
Part of the v2.5.2 release (#8877).
Why this change
The promotion PR #8878 fails its CodeQL check. The open alerts are already on staging and would carry into main. Each one was traced from source to sink before changing anything:
basenameandassertInsideDir. No request reached outsideDATA_DIR/spritesin testing, so this brings the route in line with its siblings.\s*\n\s*) and the sprite label trim (^[.\s_-]+|[.\s_-]+$) take time that grows with the square of a long run. A 50,000-character run blocks the server for about 1.5 s on an Apple M4. Both patterns predate this release.What changed
ensureCharacterGalleryDirrefuses an unsafe id and checks containment, the same wayensurePersonaGalleryDirdoes. That covers gallery upload and bake.basenameon the owner id and checks the folder withassertInsideDir, the same pattern as the upload and delete routes.\n, matched once.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Agent-run checks:
tsc --noEmitand Prettier on the four files: pass.node ./scripts/run-regressions.mjswith thesprite(7/7),gallery(7/7),novelai(2/2),image(30/30) andcharacter(31/31) filters: all pass.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.