Skip to content

fix(cve5): thread notification emails to the report thread - #313

Open
Anurag-S1ngh wants to merge 1 commit into
apache:mainfrom
Anurag-S1ngh:fix/245-thread-notification-emails
Open

Anurag-S1ngh wants to merge 1 commit into
apache:mainfrom
Anurag-S1ngh:fix/245-thread-notification-emails

Conversation

@Anurag-S1ngh

Copy link
Copy Markdown

Summary

When a record was allocated with a report messageid, the notification emails now thread to that report. The ponymail thread link is also added to the References block.

Changes

  • Add getThreadReference and getThreadMessageId in custom/cve5/script.js. The message ID is extracted from the ponymail URL in CNA_private.internal_references and validated.
  • In custom/cve5/edit.pug, add In-Reply-To to the preview and pass it through a hidden field, and add the thread URL to References.
  • Validate the header again in customRoutes/sendemails.js and pass inReplyTo to nodemailer.
  • Add unit tests for raw, percent-encoded, missing, invalid, and CRLF-bearing values.

Testing

  • VULNOGRAM_TLS_CERT=unittest/cert.pem VULNOGRAM_TLS_KEY=unittest/key.pem npm run unittest passes.
  • custom/cve5/edit.pug compiles with pug, and the rendered client script contains the thread lookup and header wiring.

Closes #245

When a record was allocated with a report message-id, the notification emails now set In-Reply-To and include the ponymail thread link in the references.
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.

link notification email to original thread if known

1 participant