Skip to content

fix(protocol): sanitize LISH manifests in both wire directions - #74

Draft
lukyrys wants to merge 5 commits into
mainfrom
fix/manifest-strip-final-directory
Draft

fix(protocol): sanitize LISH manifests in both wire directions#74
lukyrys wants to merge 5 commits into
mainfrom
fix/manifest-strip-final-directory

Conversation

@lukyrys

@lukyrys lukyrys commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Keeps node-local LISH state (directory, finalDirectory, chunks) out of manifests in both wire directions.

  • outgoing getLish responses stripped only directory and chunksfinalDirectory, a local filesystem path set while a LISH downloads into temp, leaked to remote peers
  • incoming manifests were trusted as-is: a malicious peer could set finalDirectory to redirect the post-download move to a path of its choosing, or pre-flag chunks as already downloaded so they would never be fetched
  • both directions now go through a single toManifest() helper at the trust boundary, with unit tests pinning the stripped fields
  • the downloader preserves its own locally configured move target when importing a manifest, since the sanitized manifest never carries one

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant