Browse files

Avoid wrapping AUTH PLAIN initial-response string over multiple lines.

  • Loading branch information...
1 parent c0ccd91 commit 77eee4837427feae453d177285a05b736730eec5 @cstorey cstorey committed Sep 9, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/em/protocols/smtpclient.rb
View
2 lib/em/protocols/smtpclient.rb
@@ -271,7 +271,7 @@ def invoke_auth
psw = psw.call
end
#str = Base64::encode64("\0#{@args[:auth][:username]}\0#{psw}").chomp
- str = ["\0#{@args[:auth][:username]}\0#{psw}"].pack("m").chomp
+ str = ["\0#{@args[:auth][:username]}\0#{psw}"].pack("m").gsub(/\n/, '')
send_data "AUTH PLAIN #{str}\r\n"
@responder = :receive_auth_response
else

0 comments on commit 77eee48

Please sign in to comment.