Skip to content

#6337 Fix 25 encrypted attachments limitation - #6338

Merged
sosnovsky merged 1 commit into
masterfrom
issue-6337-fix-25-encrypted-attachments-limit-live-test
Nov 18, 2026
Merged

sosnovsky merged 1 commit into
masterfrom
issue-6337-fix-25-encrypted-attachments-limit-live-test

Conversation

@martgil

@martgil martgil commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

This PR replaces the hard-coded 25-item attachment render cap in the Gmail content script with the existing Attachment.MAX_COUNT_PER_MESSAGE constant (100). The cap was added by the DoS hardening in #6335 and truncated messages with 36 encrypted attachments to 25, even though GmailParser.findAttachments already bounds attachments at 100. Reusing that constant keeps the DoS bound and restores full rendering.

Closes #6337


Tests (delete all except exactly one):

  • Difficult to test (explain why): the regression is covered by the existing live-Gmail browser test mail.google.com - attachments rendered correctly (test/source/tests/gmail.ts), which asserts 36 rendered attachment frames. It needs live Gmail credentials, so it cannot run in unit CI. Verified locally with npm run build, npx eslint, and npm run test_local_unit_consumer.

To be filled by reviewers

I have reviewed that this PR... (tick whichever items you personally focused on during this review):

  • addresses the issue it closes (if any)
  • code is readable and understandable
  • is accompanied with tests, or tests are not needed
  • is free of vulnerabilities
  • if this PR fixes a security issue: I tried to bypass the new fix, and failed (leave unticked if this PR is not a security fix)
  • is documented clearly and usefully, or doesn't need documentation

@martgil
martgil requested a review from sosnovsky as a code owner November 18, 2026 04:37
@martgil

martgil commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator Author

Hi @sosnovsky - This one is ready for a review. Thank you!

@sosnovsky sosnovsky left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍

@sosnovsky
sosnovsky merged commit 4fd4278 into master Nov 18, 2026
12 checks passed
@sosnovsky
sosnovsky deleted the issue-6337-fix-25-encrypted-attachments-limit-live-test branch November 18, 2026 15:28
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.

Fix 25 encrypted attachments limitation

2 participants