Closed Bug 1099300 Opened 10 years ago Closed 10 years ago

Lumberyard crashes if sending email to an invalid address

Categories

(Webmaker Graveyard :: Login, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: cade, Assigned: michiel)

References

Details

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

Attachments

(1 file)

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>
Summary: Lumberyard crashe3s if sending email to an invalid address → Lumberyard crashes if sending email to an invalid address
Blocks: 1049943
Does this just fail for that specific email address, or does the process exit?
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
Whiteboard: [login3] [nov28]
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: nobody → pomax
Status: NEW → ASSIGNED
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-
Whiteboard: [login3] [nov28] → [login3] [dec24] [login]
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)
Attachment #8536923 - Flags: review?(jon) → review+
merged as https://github.com/mozilla/lumberyard/commit/eed775967075db67e72f4969b4aabaf9ba45dfb7
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: