[GH-ISSUE #5859] [Issue]: Prevent import uploads when a CSRF issue is detected #3231

Closed
opened 2026-10-21 06:00:51 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @SpicyMarinara on GitHub (Sep 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5859

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Import uploads should be blocked before transfer when a CSRF issue is detected. Currently, the upload can proceed and fail only after approximately 1 GB has been uploaded.

Expected behavior

Marinara Engine should detect the CSRF issue before starting the import upload and prevent the upload from beginning, with a clear error message.

Actual behavior

After bypassing Cloudflare to load a backup, Marinara Engine uploaded approximately 1 GB before reporting a CSRF issue and refusing the import.

Steps to reproduce

  1. Bypass Cloudflare to load a backup.
  2. Start importing the backup.
  3. Allow the import upload to proceed.
  4. Observe that a CSRF issue is reported only after approximately 1 GB has uploaded.

Environment

  • Marinara Engine version: Not provided
  • Install type: Not provided
  • OS + version: Not provided
  • Browser or app shell: Not provided

Logs, screenshots, or video

Not provided in the Discord context.

Additional context

The report specifically requests that uploads be blocked immediately when a CSRF issue is present, rather than refusing after the upload has completed or substantially progressed.

Discord thread: Prevent import uploads if there is a csrf issue
Discord thread link: https://discord.com/channels/1417099416812392641/1545228999024840714
Requested by: Kuc0 (kuc0, Discord ID 108988150629531648)

Discord thread transcript (2 messages)
[2026-09-04T00:28:22.334Z] ionstorm66: Uploads should be blocks if there is a csrf issue instead of refusing after upload. Had to bypass cloudflare to load a backup, and only AFTER uploading 1GB did it say there was a csrf issue.
[Discord message: https://discord.com/channels/1417099416812392641/1545228999024840714/1545228999024840714]

[2026-09-04T00:28:23.013Z] Professor Mari [bot]: Howdy!

Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.**

**Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab:

`Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.`

If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here:

`Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version`

Thank you, this will help tremendously.

This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case.

Cheers!
[Discord message: https://discord.com/channels/1417099416812392641/1545228999024840714/1545229001872900238]

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Sep 5, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5859 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Import uploads should be blocked before transfer when a CSRF issue is detected. Currently, the upload can proceed and fail only after approximately 1 GB has been uploaded. ## Expected behavior Marinara Engine should detect the CSRF issue before starting the import upload and prevent the upload from beginning, with a clear error message. ## Actual behavior After bypassing Cloudflare to load a backup, Marinara Engine uploaded approximately 1 GB before reporting a CSRF issue and refusing the import. ## Steps to reproduce 1. Bypass Cloudflare to load a backup. 2. Start importing the backup. 3. Allow the import upload to proceed. 4. Observe that a CSRF issue is reported only after approximately 1 GB has uploaded. ## Environment - Marinara Engine version: Not provided - Install type: Not provided - OS + version: Not provided - Browser or app shell: Not provided ## Logs, screenshots, or video Not provided in the Discord context. ## Additional context The report specifically requests that uploads be blocked immediately when a CSRF issue is present, rather than refusing after the upload has completed or substantially progressed. Discord thread: Prevent import uploads if there is a csrf issue Discord thread link: https://discord.com/channels/1417099416812392641/1545228999024840714 Requested by: Kuc0 (kuc0, Discord ID 108988150629531648) <details> <summary>Discord thread transcript (2 messages)</summary> ```text [2026-09-04T00:28:22.334Z] ionstorm66: Uploads should be blocks if there is a csrf issue instead of refusing after upload. Had to bypass cloudflare to load a backup, and only AFTER uploading 1GB did it say there was a csrf issue. [Discord message: https://discord.com/channels/1417099416812392641/1545228999024840714/1545228999024840714] [2026-09-04T00:28:23.013Z] Professor Mari [bot]: Howdy! Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.** **Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab: `Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.` If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here: `Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version` Thank you, this will help tremendously. This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case. Cheers! [Discord message: https://discord.com/channels/1417099416812392641/1545228999024840714/1545229001872900238] ``` </details> ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 06:00:51 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Sep 5, 2026):

Owner: @SpicyMarinara, implementation by Codex in Issue Sweep PR #5865. I have read the issue and all current comments. Work will target staging, reuse existing code, and include focused regression proof; unrelated open/draft PRs remain untouched.

<!-- gh-comment-id:5551230047 --> @SpicyMarinara commented on GitHub (Sep 5, 2026): Owner: @SpicyMarinara, implementation by Codex in Issue Sweep PR #5865. I have read the issue and all current comments. Work will target staging, reuse existing code, and include focused regression proof; unrelated open/draft PRs remain untouched.
Author
Owner

@SpicyMarinara commented on GitHub (Sep 5, 2026):

Completed on staging in #5865 (merge 314a71a586).

Added a body-free CSRF preflight before multipart uploads; the actual upload retains its independent security checks.

Focused regression proof and manual verification boundaries are documented in the PR. Required checks and the full final regression matrix passed; CodeRabbit completed review with all threads resolved. Closing as completed on staging, not a main release.

<!-- gh-comment-id:5552144804 --> @SpicyMarinara commented on GitHub (Sep 5, 2026): Completed on staging in #5865 (merge 314a71a5862f120284bb24014e401e226be79866). Added a body-free CSRF preflight before multipart uploads; the actual upload retains its independent security checks. Focused regression proof and manual verification boundaries are documented in the PR. Required checks and the full final regression matrix passed; CodeRabbit completed review with all threads resolved. Closing as completed on staging, not a main release.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#3231
No description provided.