Skip to content

fix: add email validation to secr announcement form#11245

Open
noralmaani wants to merge 4 commits into
ietf-tools:mainfrom
noralmaani:secr-announce-form-validation
Open

fix: add email validation to secr announcement form#11245
noralmaani wants to merge 4 commits into
ietf-tools:mainfrom
noralmaani:secr-announce-form-validation

Conversation

@noralmaani

Copy link
Copy Markdown

fixes #11180

@jennifer-richards jennifer-richards left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A few more test cases are needed (and if these uncover problems, please fix)

self.assertEqual(len(outbox), 1)
self.assertEqual(outbox[0]["subject"], "Test Subject")
self.assertEqual(outbox[0]["to"], "<phil@example.com>")
self.assertEqual(outbox[0]["to"], "<phil@example.com>, <lizz@example.com>, <test@example.com>")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should make sure this accepts addresses like no-brackets@example.com and Named Person <named@example.com> as well

"reply_to": "secretariat@ietf.org",
"subject": "Test Subject",
"body": "This is a test.",
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also need test cases for

  • both the to_custom and cc fields are empty (i.e., no addresses at all)
  • to_custom field has a bad list of otherwise valid addresses (e.g., lizz@example.com; valid_email@example.com)
  • same, but for cc field

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.

Secr announcement tool silently sends no message if addressee fields are badly formatted

2 participants