Lumberyard crashes if sending email to an invalid address

RESOLVED FIXED

Status

Webmaker
Login
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: cade, Assigned: pomax)

Tracking

Details

(Whiteboard: [login3] [dec24] [login])

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
secretrobotron discovered that if you fool the sign up form with an invalid email (i.e. '1@1.1') you kill lumberyard.

This is because SES refuses to deliver mail to bogus addresses (makes sense)


-----------------

<ErrorResponse xmlns="http://ses.amazonaws.com/doc/2010-12-01/">
   </Error>
      generateTextFromHTML: true,
     <Type>Sender</Type>
     <Code>InvalidParameterValue</Code>
      to: '111@111111.1',
         dkimOptions: false,
 Error: Email failed: 400
 </ErrorResponse>
         transportType: 'SES',
 subject: 'Welcome to Webmaker. Let\'s get you started.',
    transport: [Object],
<Message>Invalid domain name: '111111.1'.</Message>
(Reporter)

Updated

4 years ago
Summary: Lumberyard crashe3s if sending email to an invalid address → Lumberyard crashes if sending email to an invalid address
(Reporter)

Updated

4 years ago
Blocks: 1049943

Comment 1

4 years ago
Does this just fail for that specific email address, or does the process exit?

Comment 2

4 years ago
Any invalid address will cause lumberyard to crash (I programmed it that way). To solve this, I think we should tie in Mailgun's address validator on the front-end and the back-end: http://documentation.mailgun.com/api-email-validation.html

Updated

4 years ago
Whiteboard: [login3] [nov28]
(Assignee)

Comment 3

3 years ago
Created attachment 8536923 [details] [review]
https://github.com/mozilla/lumberyard/pull/25

I have a patch here although I've not been able to test it, so I may need a little help with that.
Attachment #8536923 - Flags: review?(jon)
(Assignee)

Updated

3 years ago
Assignee: nobody → pomax
Status: NEW → ASSIGNED

Comment 4

3 years ago
Comment on attachment 8536923 [details] [review]
https://github.com/mozilla/lumberyard/pull/25

This patch is good, in the sense that it works! Too well... :)

Right now lumberyard is programmed to process.exit(1) if any Errors are raised during execution. So you'll need to modify the processor to not exit(1) on certain kinds of errors or change that work so it doesn't raise an error.

Ping me when you hop online and I'll help you with your SQS queue setup.
Attachment #8536923 - Flags: review?(jon) → review-

Updated

3 years ago
Whiteboard: [login3] [nov28] → [login3] [dec24] [login]
(Assignee)

Comment 5

3 years ago
Comment on attachment 8536923 [details] [review]
https://github.com/mozilla/lumberyard/pull/25

updated the patch - a validation failure now simply goes "okay, good. I won't mail our any mail and just straight up continue on to the callback" while a validate call error itself is still a hard fail.
Attachment #8536923 - Flags: review- → review?(jon)

Updated

3 years ago
Attachment #8536923 - Flags: review?(jon) → review+
(Assignee)

Comment 6

3 years ago
merged as https://github.com/mozilla/lumberyard/commit/eed775967075db67e72f4969b4aabaf9ba45dfb7
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.