typst / webapp-issues

Issue tracker for Typst's web app.
https://typst.app
12 stars 0 forks source link

Ability to non-persistently modify and preview changes made with Vim mode delete/paste commands in the read-only shared document #258

Open Andrew15-5 opened 8 months ago

Andrew15-5 commented 8 months ago

Description

I've opened a read-only document that was shared and thought if I can at all change it. Surprisingly I can! But only with delete/cut/paste command in Vim mode, anything else doesn't work (including undo command). There is an error about not being able to change-change stuff, but the preview panel shows what was changed. It's better to remove this ability, so that no one can change anything in any way.

image image

Update: The changes persist! I just refreshed the page with intention to clear my "even doings", but they are still there! Even disabling caching and pressing Ctrl+F5 — doesn't work. The question is, how can I clear my "unpersistently-persistent" changes? The answer is to delete the respective entry in the Indexed DB.

Reproduction URL

No response

Browsers

Firefox

OS

Linux

laurmaedje commented 8 months ago

As discussed on Discord, the changes aren't synced to the server (because of no permission), but still persisted locally in the browser's IndexDB. While it's thus not a security issue, it's still a bug that should be fixed with priority.