Skip to content

attachments: validate file encryption inputs - #129

Open
Ap4sh wants to merge 1 commit into
session-foundation:devfrom
Ap4sh:validate-attachment-file-inputs
Open

attachments: validate file encryption inputs#129
Ap4sh wants to merge 1 commit into
session-foundation:devfrom
Ap4sh:validate-attachment-file-inputs

Conversation

@Ap4sh

@Ap4sh Ap4sh commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

summary

the file-based attachment encryption overloads currently read 32 bytes from seed without checking its size, unlike the buffer overloads. they also ignore allow_large, so files above MAX_REGULAR_SIZE are accepted when the flag is false

this validates both inputs before hashing the file while keeping oversized file support when allow_large=true

tests

  • ./Build/tests/testAll "Attachment file encryption validates its inputs"
  • ./Build/tests/testAll "[attachments]"
  • ./Build/tests/testAll
  • ./utils/ci/drone-format-verify.sh

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