mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #8215] Harden ordinary chat request validation while preserving data transfers #8159
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#8159
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?
Originally created by @SpicyMarinara on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8215
Originally assigned to: @SpicyMarinara on GitHub.
Description
Ordinary chat creation and settings updates should reject malformed roster data before collecting a separate schema-validation error for every invalid entry. Validation responses should also keep diagnostic output bounded.
The assessed hardening belongs on
staging. Preserve valid rosters, user text, and all import/export, upload, backup and profile-transfer behavior. Do not add shared-schema collection caps or lower the application-wide upload limit.Expected behavior
Reject malformed roster input promptly on the ordinary chat resource endpoints, retain useful validation diagnostics, and keep existing data-transfer paths working with large files and collections.
Current behavior
The ordinary create/update controllers send roster arrays directly to schema validation, and the shared error handler returns every resulting issue.
Environment
Confirmed by source inspection and bounded local validation on current
staging(c97f83ffbc86ee5156903620f7a50daadb780822). Remote access remains subject to the existing host, authentication, network and CSRF policy; no authentication bypass or server crash is claimed.Implementation ownership
@SpicyMarinara / Codex is implementing this in
fix/chat-request-validation-hardening. The dependency-only update in #8210 is not a replacement for controller-level handling; Zod 4 compatibility is being assessed separately.@SpicyMarinara commented on GitHub (Oct 23, 2026):
Implemented on
stagingin #8216, mergecc394efd6ca5682fc3047058b99b7bf43e5bf116. Ordinary chat creation/settings reject malformed roster entries before schema validation, with at most 50 public validation details.No import/export/upload/backup/profile or shared-schema limits were added or tightened, and no user text was shortened. The 1 MiB budget applies only to ordinary
POST /api/chatsandPATCH /api/chats/:id. Real native JSON and multipart character transfers preserved 5,900,833 exported bytes and the text hash; a native lorebook round trip preserved all 10,001 entries and content in 13,057,692 exported bytes.All eight required checks and the complete Node lane passed on the exact reviewed head. Actual Dottore review completed with zero defects and one nonblocking wording note. The merge parents, tree and all five reviewed file blobs were verified. Raw validation, review and source-preservation proof has 27 files whose published bytes were checked against the local evidence.
This closes the focused controller-hardening issue. Zod remains 3.25.76; a complete major-version migration is separate compatibility work, and this patch is not presented as a version-only advisory fix. Post-merge CodeQL and the container workflow passed, as did all three Node shards and their aggregate. The Regression Checks workflow remains cancelled: both browser attempts exceeded its existing 10-minute whole-job budget. The first passed all 7 smoke assertions after 469.170 seconds of setup; its one unchanged-head retry spent 589.457 seconds still downloading Ubuntu apt packages and reached no assertions. No further retry or weakened checks were used, so this is not an all-green post-merge CI claim.
At the final recorded registry readback,
stagingwas stillcc394efd6ca5682fc3047058b99b7bf43e5bf116, andghcr.io/pasta-devs/marinara-engine:stagingresolved tosha256:5da8a514cf65a2ff2b348afbe7c7d2798593198bf1ccee3090c7f0e117359309. Both linux/amd64 and linux/arm64 revisions matched that merge. Registry publication is verified; no local Docker pull, user-device execution or main release is claimed.