Skip to content

Re-protecting a synced private feed address leaves a new secret ID each time #490

Closed

Description

@chhoumann

When a synced data.json holds a raw private feed address (a device still on 2.21.1 wrote it), every read that protects the address stores it under a fresh podnotes-feed-url-<uuid> secret (src/services/FeedUrlRepository.ts, store). One incoming change can be read several times (the adoption read, the fresh read before the protective save from #489, and overlapping notifications). Only the last reference reaches data.json; the rest are orphans.

Found by the independent verification of #489 on Obsidian 1.14.4 (Linux):

  • A one-minute simulation with 20 incoming raw changes grew the PodNotes secrets from 12 to 70.
  • After a plugin reload, the startup sweep cleared all but one value, but listSecrets() still returned all 70 IDs. SecretStorage has no delete, so a cleared ID stays listed.

So during the 2.22.0 upgrade window, a device that syncs with a 2.21.1 device collects secret IDs without bound, and they survive restarts.

Expected: protecting the same address again reuses its reference, so the number of PodNotes secret IDs stays bounded by the number of distinct private feeds.

Related: #488, #489.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions