plannotator icon indicating copy to clipboard operation
plannotator copied to clipboard

[Bug] plannotator-* preference cookies pollute every app running on localhost

Open PassionZale opened this issue 1 month ago • 2 comments

Problem

Plannotator stores UI preferences in host-only cookies scoped to localhost (no Domain attribute). Browsers scope cookies by hostname, not port — so every one of these cookies is attached to every origin on localhost, including completely unrelated local development projects.

Evidence

Screenshot from Chrome DevTools on one of my own local projects (a dev server on port 55042 — not plannotator):

Image

The entire cookie list for this origin is plannotator-* entries (annotation-*, diff-*, editor-*, filebro*, grid-*, guide-*, …), dozens of them, all domain localhost, path /, SameSite=Lax. None of them belong to this project.

Impact

  • Every request my local apps make to localhost carries a large Cookie header full of plannotator preferences.
  • DevTools for any localhost project is cluttered with these entries.
  • There is no safe way to clean up: clearing cookies by hostname wipes data for all local apps at once, not just plannotator.

Request

Provide a supported way to isolate plannotator's storage from other localhost apps — e.g. serving on a dedicated hostname (such as plannotator.localhost, which browsers resolve to 127.0.0.1 per RFC 6761) or another opt-in mechanism, so its cookies don't leak into unrelated local projects.

Environment

  • plannotator: v0.28.20 (latest release at the time of writing: v0.28.23 — not verified against it)
  • OS: macOS Sonoma 14.3.1 (Apple M3 Pro)
  • Browser: Chrome 156
  • Agent: Claude Code 2.1.295

PassionZale avatar Oct 26 '26 02:10 PassionZale

@backnotprop I’m already working on this and have traced the cause. I’ll share a PR once the fix is ready.

utpalsinghdev avatar Oct 26 '26 03:10 utpalsinghdev

Thanks @utpalsinghdev for the quick response and for taking this on — really appreciate you tracing the cause and opening PR #2188 so fast!

PassionZale avatar Oct 26 '26 06:10 PassionZale