mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #5107] [MERGED] Fix Windows gallery media containment #6631
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#6631
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/5107
Author: @SpicyMarinara
Created: 8/15/2026
Status: ✅ Merged
Merged: 8/16/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/5099-windows-gallery-paths📝 Commits (1)
9d6579eFix Windows gallery media containment📊 Changes
3 files changed (+58 additions, -4 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
packages/server/src/utils/media-file-security.ts(+17 -3)📝
scripts/regressions/profile-import-asset-security.regression.ts(+40 -1)📄 Description
Linked issue
Closes #5099
Why this change
Valid Gallery images could return 404 on Windows when
realpathcanonicalized their drive letter or directory casing differently from the configured media root. The file was safe and present, but the case-sensitive prefix check rejected it.What changed
Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Automated verification performed:
pnpm --filter @marinara-engine/server lintpnpm --filter @marinara-engine/server exec tsx ../../scripts/regressions/profile-import-asset-security.regression.tsgit diff --checkA real Windows install with drive-case, junction, or OneDrive canonicalization remains a maintainer/manual verification item.
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue openedNo user-facing documentation page or release metadata changed.
CHANGELOG.mdincludes the fix.UI evidence (if applicable)
Not applicable; this is a server file-serving regression.
Summary by CodeRabbit
Bug Fixes
Documentation
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.