Guest User

Untitled

a guest
May 15th, 2026
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. Here's what we did to recover your wiki draft:
  2.  
  3. 1. **Located Firefox's profile** — the snap install stores data at `~/snap/firefox/common/.mozilla/firefox/` instead of the usual `~/.mozilla/firefox/`
  4.  
  5. 2. **Decoded the session store** — `recovery.jsonlz4` uses a `mozLz40\x00` magic header followed by a 4-byte little-endian uncompressed size, then raw LZ4 block data. This let us find the open tabs and identify the wiki editor tab — but the editor field was empty there.
  6.  
  7. 3. **Queried Firefox's localStorage DB** — Firefox stores localStorage in `storage/default/https+++www.example.com/ls/data.sqlite`. HugeRTE (wiki rich text editor) autosaves drafts to localStorage under keys like `hugerte-autosave-{path}-{editor-id}-draft`.
  8.  
  9. 4. **Decoded the stored value** — The `data` table stores values as compressed blobs. The schema columns `conversion_type=1` (UTF-8) and `compression_type=1` (Snappy) told us the encoding. The blob is a raw Snappy-compressed UTF-8 string (no header to skip), decompressed with `python-snappy`.
  10.  
  11. 5. **Extracted clean HTML** — The decompressed bytes were valid UTF-8 HTML, saved to `/tmp/draft_clean.html` and opened in Chrome.
  12.  
  13. The key insight was that Firefox's session store doesn't capture iframe-based rich text editors, but HugeRTE's own autosave mechanism had written the content to localStorage, which Firefox *does* persist to disk.
  14.  
Advertisement
Add Comment
Please, Sign In to add comment