Make PLAIN AUTH SMTP work with long username/passwords. #364

Merged
merged 1 commit into from Sep 11, 2012

Conversation

Projects
None yet
3 participants
Contributor

cstorey commented Sep 10, 2012

As it stands, the smtpclient protocol uses Array#pack to base64 encode data, which wraps the output at 60-characters (as you would when sending base64-encoded mail). However, the AUTH SMTP extension expects the initial authentication string to be a single line.

This is a particular issue when using credentials for Amazon's simple email service, which tend to be quite long (>64 characters combined).

Is this okay to be merged as is, or is there anything else you'd need me to do first?

Contributor

ibc commented Sep 10, 2012

It's much better to use Base64::strict_encode64 which does not add \n.

Contributor

ibc commented Sep 10, 2012

Unfortunately Base64::strict_encode64 does not exist in Ruby 1.8.

tmm1 merged commit 82e9f62 into eventmachine:master Sep 11, 2012

1 check failed

default The Travis build failed
Details
Contributor

cstorey commented Sep 11, 2012

Thanks!

@sodabrew sodabrew pushed a commit to sodabrew/eventmachine that referenced this pull request Jan 27, 2015

@ibc ibc Remove all the \n in SMTP credentials (eventmachine#364). e829764
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment