Skip to content

#6282 Re-audit source and sinks - #6283

Draft
martgil wants to merge 2 commits into
masterfrom
issue-6282-review-source-and-sinks
Draft

#6282 Re-audit source and sinks#6283
martgil wants to merge 2 commits into
masterfrom
issue-6282-review-source-and-sinks

Conversation

@martgil

@martgil martgil commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

This PR re-audit and improve source and sinks.

close #6282


Tests (delete all except exactly one):

  • Does not need tests (refactor only, docs or internal changes)

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
  • is documented clearly and usefully, or doesn't need documentation

@martgil
martgil requested a review from sosnovsky as a code owner August 27, 2026 06:50
@martgil
martgil marked this pull request as draft August 27, 2026 10:39

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.

in this file we also print raw error details at

<pre data-test="error-details">${e.stack}\n\nDecryptError:\n${JSON.stringify(e.decryptError, undefined, 2)}</pre>

it can include some malicious code as well, let's perform Xss.escape there too

`To: ${this.messageToReplyOrForward.headers.to.join(', ')}<br>` +
(this.messageToReplyOrForward.headers.cc?.length ? `Cc: ${this.messageToReplyOrForward.headers.cc?.join(', ')}` : '') +
`From: ${Xss.escape(from || '')}<br>` +
`Date: ${Xss.escape(dateStr)}<br>` +

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.

we also have unescaped Date header at

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.

Audit HTML sinks across the codebase for missing input sanitization

2 participants