peerdraft / obsidian-plugin

Secure real-time collaboration for Obsidian
GNU General Public License v3.0
29 stars 1 forks source link

Server side session remains open and link still valid after Stopping session from Obsidian #1

Closed hystrix0 closed 6 months ago

hystrix0 commented 6 months ago

Nifty thing, this. Thanks

Was testing it out with a friend. After issuing a Peerdraft: Stop Shared Session from the command pallet in Obsidian, it immediately severed the connection to my local file from the server session. Good.

However, the following unexpected behavior was observed:

  1. The remote user with the web interface still had access to the disconnected copy of the content, and was not notified that the session had ended.
  2. I was able to still open up the link, and join him in editing the server-only copy of the document
  3. The link remains available even from new sessions (incognito etc.)

I am assuming this is unintended in the design of the application, because then my personal content remains alive in the server side mirror, albeit disconnected from my Obsidian. So my local file is safe from further edits, but my collaborators still have access to the stale content, and though it is a hash, my shadow copy remains out there.

Peerdraft Version: 1.0.6 Obsidian: 1.5.3 Installer version: v1.4.13

schlundd commented 6 months ago

It is indeed a bug that people do not get notified when you close the session and that others can still "join" with the link.

However:

because then my personal content remains alive in the server side mirror, albeit disconnected from my Obsidian

There is no server-side copy of your document. The content is exchanged directly between Obsidian and the browser(s) with the shared link open.

hystrix0 commented 6 months ago

Thanks for the fix, and for the clarification. So the "peer" keeps the content alive... not a server-side copy of the data. Got it.

I'll give the fixes a test.

hystrix0 commented 6 months ago

Confirmed working as intended!

  1. Web Peer user received native browser notification that the session was ended
  2. On web page reload the content disappears
  3. Going to the link from incognito session results in empty session, no content. Good.