Skip to content

fix: validate SOGS attachment sizes#1954

Open
Ap4sh wants to merge 1 commit into
session-foundation:devfrom
Ap4sh:fix-sogs-attachment-size-validation
Open

fix: validate SOGS attachment sizes#1954
Ap4sh wants to merge 1 commit into
session-foundation:devfrom
Ap4sh:fix-sogs-attachment-size-validation

Conversation

@Ap4sh

@Ap4sh Ap4sh commented Jun 6, 2026

Copy link
Copy Markdown

Contributor checklist:

  • My commits are in nice logical chunks with good commit messages
  • My changes are rebased on the latest dev branch
  • The relevant checks pass
  • My changes are ready to be shipped to users

Description

Refs #1953

This hardens SOGS attachment downloads by requiring message attachments to include an expected size before they are accepted as successful downloads

Community avatar downloads still opt into unknown-size payloads explicitly, since that path does not get size metadata

Tests:

  • corepack pnpm exec tsc
  • corepack pnpm exec eslint --cache .
  • corepack pnpm exec cross-env IS_UNIT_TEST=1 mocha
  • corepack pnpm dedupe --check
  • corepack pnpm build:protobuf
  • corepack pnpm build:sass
  • corepack pnpm build:svg
  • corepack pnpm worker:utils
  • corepack pnpm worker:libsession
  • corepack pnpm worker:image_processor

@MikeScanlan5 MikeScanlan5 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks clear and fixes the intended attachment size issue.

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.

2 participants