[GH-ISSUE #5222] [Issue]: APK bootstrap opens secret login and rejects Origin null #2891

Closed
opened 2026-10-21 05:57:42 +07:00 by bsakaguchi · 1 comment
Owner

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

Originally assigned to: @SpicyMarinara on GitHub.

Summary

The released Android APK bootstrap opens a separate localhost browser login, asks the installer to paste the generated local-access secret, and can then fail with Origin: null rejected by CSRF.

Expected behavior

Downloading and opening the APK should keep its per-install credential automatic. After Android and Termux system prompts, the authenticated app shell should open Marinara without .env edits, secret entry, or a CSRF_TRUSTED_ORIGINS workaround.

Actual behavior

The Termux launcher auto-opens /android-login. After the correct secret is entered, Android can submit the authenticated session with Origin: null; the general CSRF gate rejects it before Android authentication runs. The resulting hint incorrectly suggests adding null to CSRF_TRUSTED_ORIGINS, although literal null is intentionally treated as unset.

Steps to reproduce

  1. Install the released Marinara Engine APK and let it install Termux.
  2. Enable Termux external commands and tap Install / Start Marinara.
  3. Follow the opened browser login, paste the value from cat ~/.marinara-engine/android-secret, and submit.

Environment

  • Marinara Engine version: released main APK reported in the support thread (exact version not supplied)
  • Install type: Android APK-managed Termux
  • OS + version: Android version not supplied
  • Browser or app shell: APK WebView plus auto-opened Android browser (browser version not supplied)

Logs, screenshots, or video

The support thread included screenshots of the browser authentication prompt and the subsequent Origin: null CSRF failure; original image files were not attached to this issue.

Additional context

Manual Termux installation worked around the problem. Adding null, http://null, or localhost entries to CSRF_TRUSTED_ORIGINS did not and should not be required.

Owner: @SpicyMarinara

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Aug 18, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5222 Originally assigned to: @SpicyMarinara on GitHub. ## Summary The released Android APK bootstrap opens a separate localhost browser login, asks the installer to paste the generated local-access secret, and can then fail with `Origin: null` rejected by CSRF. ## Expected behavior Downloading and opening the APK should keep its per-install credential automatic. After Android and Termux system prompts, the authenticated app shell should open Marinara without `.env` edits, secret entry, or a `CSRF_TRUSTED_ORIGINS` workaround. ## Actual behavior The Termux launcher auto-opens `/android-login`. After the correct secret is entered, Android can submit the authenticated session with `Origin: null`; the general CSRF gate rejects it before Android authentication runs. The resulting hint incorrectly suggests adding `null` to `CSRF_TRUSTED_ORIGINS`, although literal `null` is intentionally treated as unset. ## Steps to reproduce 1. Install the released Marinara Engine APK and let it install Termux. 2. Enable Termux external commands and tap **Install / Start Marinara**. 3. Follow the opened browser login, paste the value from `cat ~/.marinara-engine/android-secret`, and submit. ## Environment - Marinara Engine version: released main APK reported in the support thread (exact version not supplied) - Install type: Android APK-managed Termux - OS + version: Android version not supplied - Browser or app shell: APK WebView plus auto-opened Android browser (browser version not supplied) ## Logs, screenshots, or video The support thread included screenshots of the browser authentication prompt and the subsequent `Origin: null` CSRF failure; original image files were not attached to this issue. ## Additional context Manual Termux installation worked around the problem. Adding `null`, `http://null`, or localhost entries to `CSRF_TRUSTED_ORIGINS` did not and should not be required. Owner: @SpicyMarinara ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:57:42 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Aug 18, 2026):

Fixed in #5224 and merged into staging as 120481a293.

<!-- gh-comment-id:5330378077 --> @SpicyMarinara commented on GitHub (Aug 18, 2026): Fixed in #5224 and merged into staging as 120481a2938f9642628816ef949de316d8190eb5.
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#2891
No description provided.