Skip to content

Commit

Permalink
Remove all the \n in SMTP credentials (eventmachine#364).
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Sep 10, 2012
1 parent 67ea6d4 commit e829764
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/em/protocols/smtpclient.rb
Expand Up @@ -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
Expand Down

0 comments on commit e829764

Please sign in to comment.