Skip to content

Fix for two conditional statements relating to address parsing in smtp/address.js #41

Merged
merged 1 commit into from Aug 3, 2012

2 participants

@tedeh
tedeh commented Jul 30, 2012

I'm attaching a pretty simple fix that prevents emailjs from getting stuck in an infinite loop (100 % CPU and increasing memory consumption until an allocation error terminates it) when it encounters an email address that is both invalid like john@smith@example.com and has a UTF-8 name encoded as base64 such as "=?UTF-8?B?w7bDtsO2?=". The problem arises from the fact that Address.prototype.getphraselist always returns an Array and Boolean([]) equals true and not false (therefore testing for length of the Array instead).

@eleith eleith merged commit 1c0021c into eleith:master Aug 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.