mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #722] [Issue]: Prompt preset changes silently fail when the current origin is not trusted by CSRF protection #343
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#343
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 @cha1latte on GitHub (May 12, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/722
Summary
On a self-hosted Marinara install, changing a chat's prompt preset appears to work in the UI, but the selection does not persist. In the reported case, the chat stayed
promptPresetId: nulleven after selecting Marinara's Universal Preset.This affects setups that need multiple access origins, such as public IP, Tailscale, Docker, and localhost access.
Expected behavior
Selecting a prompt preset should save the chat's
promptPresetId.If the current origin is not trusted, the UI should show a visible save error instead of silently leaving the chat unchanged.
Common self-hosted origins such as Tailscale, Docker/localhost, and public IP access should be automatically whitelisted for CSRF where appropriate, or clearly surfaced to the user when manual configuration is required.
Actual behavior
The preset selector looks clickable, but the change does not persist.
A direct save attempt returns:
The chat remains preset-less, which can lead to very different roleplay output from the same preset in other apps.
Steps to reproduce
Marinara's Universal Preset.promptPresetId: null.Marinara Engine version
1.5.9
Install type
Other
Self-hosted / public-origin deployment.
OS + version
Windows 11
Browser or app shell
Brave Browser
Screenshots or video
Not a visual/UI issue.
Logs
Direct save attempt response:
Observed chat state:
Observed default preset:
Additional context
Self-hosted setups may need more than one trusted origin at once, for example a public IP, a Tailscale hostname/IP, Docker/localhost, and LAN access.
The app should either automatically whitelist safe/common self-hosted origins where appropriate, or provide clear setup guidance for adding them to
CSRF_TRUSTED_ORIGINS.Most importantly, if any request fails CSRF, the UI should surface a clear error/toast instead of silently doing nothing. In this case, the failed save made the issue look like a prompt/model quality regression because the roleplay chat was not actually using the selected preset.
Template check