[GH-ISSUE #794] [Issue]: Memory Nag remote client drops X-Admin-Secret on plain HTTP #410

Closed
opened 2026-10-20 17:27:18 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Romuromylus on GitHub (Sep 11, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/794

Originally assigned to: @Romuromylus on GitHub.

Summary

Memory Nag's client only attaches the X-Admin-Secret header when the page is served over HTTPS. On a plain-HTTP remote client (LAN or Termux server reached by IP) every Memory Nag route is therefore rejected by the Engine's privileged gate with "Invalid or missing X-Admin-Secret header", even though the secret is configured on the server and saved in the browser.

Affected package

memory-nag (1.1.0)

Expected behavior

The remote client authenticates with the saved admin secret and Create Memories succeeds, the same way the Engine's own privileged calls (which send the header regardless of protocol) already do from that browser.

Actual behavior

Create Memories fails with "Invalid or missing X-Admin-Secret header".

Steps to reproduce

  1. Run Marinara Engine with ADMIN_SECRET set and Memory Nag 1.1.0 installed, reached over plain HTTP from another device.
  2. Save the same secret in Settings, Advanced, Admin Access on the remote browser.
  3. Open Memory Nag in Chat Settings and click Create Memories.

Environment

  • Marinara Engine version: 2.4.5
  • Package version: 1.1.0
  • Install type: termux
  • OS + version: Server Android/Termux, client Windows 10
  • Browser or app shell: Firefox 155

Logs, screenshots, or video

Reporter screenshot shows the Creating Memories dialog with "Invalid or missing X-Admin-Secret header".

Additional context

Mirror of Pasta-Devs/Marinara-Engine#6048. The Engine's api-client.ts attaches the header on any protocol; Memory Nag's api.ts adds an extra window.location.protocol !== "https:" early return that the Engine does not have, so the two disagree on the same browser. Because the Engine already sends the same secret in plaintext for its own privileged requests on that connection, the gate does not protect the secret, it only disables the package.

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 @Romuromylus on GitHub (Sep 11, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/794 Originally assigned to: @Romuromylus on GitHub. ## Summary Memory Nag's client only attaches the `X-Admin-Secret` header when the page is served over HTTPS. On a plain-HTTP remote client (LAN or Termux server reached by IP) every Memory Nag route is therefore rejected by the Engine's privileged gate with "Invalid or missing X-Admin-Secret header", even though the secret is configured on the server and saved in the browser. ## Affected package `memory-nag` (1.1.0) ## Expected behavior The remote client authenticates with the saved admin secret and Create Memories succeeds, the same way the Engine's own privileged calls (which send the header regardless of protocol) already do from that browser. ## Actual behavior Create Memories fails with "Invalid or missing X-Admin-Secret header". ## Steps to reproduce 1. Run Marinara Engine with `ADMIN_SECRET` set and Memory Nag 1.1.0 installed, reached over plain HTTP from another device. 2. Save the same secret in Settings, Advanced, Admin Access on the remote browser. 3. Open Memory Nag in Chat Settings and click Create Memories. ## Environment - Marinara Engine version: 2.4.5 - Package version: 1.1.0 - Install type: termux - OS + version: Server Android/Termux, client Windows 10 - Browser or app shell: Firefox 155 ## Logs, screenshots, or video Reporter screenshot shows the Creating Memories dialog with "Invalid or missing X-Admin-Secret header". ## Additional context Mirror of Pasta-Devs/Marinara-Engine#6048. The Engine's `api-client.ts` attaches the header on any protocol; Memory Nag's `api.ts` adds an extra `window.location.protocol !== "https:"` early return that the Engine does not have, so the two disagree on the same browser. Because the Engine already sends the same secret in plaintext for its own privileged requests on that connection, the gate does not protect the secret, it only disables the package. ## 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-20 17:27:18 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Romuromylus commented on GitHub (Sep 11, 2026):

Fixed by #795 (memory-nag 1.1.1), merged into staging as dbdd59740.

<!-- gh-comment-id:5637079284 --> @Romuromylus commented on GitHub (Sep 11, 2026): Fixed by #795 (memory-nag 1.1.1), merged into `staging` as dbdd59740.
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-Agents#410
No description provided.