[BUG] 1.8.previews smtp.rb auth

J

Jim Bob

Hi,
I think that smtp auth in the 1.8 series rubies has a small bug. smtp.rb
checks respond_to?(auth_method), but the relevant auth methods are
now private, and so the check always returns false, raising an ArgumentError
since the "includePriv" argument of respond_to? is not being set.

In 1.6.8, these methods were public, so that the check worked ok.
Below is a small patch, in case that makes things any
easier.

--- smtp.rb 2003-07-29 08:36:28.000000000 -0700
+++ smpt.rb.new 2003-08-02 02:43:00.000000000 -0700
@@ -520,7 +520,7 @@
unless user and secret
auth_method = "auth_#{authtype || 'cram_md5'}"
raise ArgumentError, "wrong auth type #{authtype}"\
- unless respond_to?(auth_method)
+ unless respond_to?(auth_method, true)
end

def authenticate( user, secret, authtype )
 
M

Minero Aoki

Hi,

In mail "[BUG] 1.8.previews smtp.rb auth"
Jim Bob said:
Hi,
I think that smtp auth in the 1.8 series rubies has a small bug. smtp.rb
checks respond_to?(auth_method), but the relevant auth methods are
now private, and so the check always returns false, raising an ArgumentError
since the "includePriv" argument of respond_to? is not being set.

Thank you. Checked in now.

Regards,
Minero Aoki
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top