diff options
author | Steve Hay <steve.m.hay@googlemail.com> | 2014-10-10 23:42:22 +0100 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2014-10-10 23:42:22 +0100 |
commit | 2c160b441ccc609bf4397ad7dd783c68b8cac4c2 (patch) | |
tree | fe98d58afc79f4b77f634210b85c95cb74185c05 | |
parent | de461570042fa59a336e7eb210ffd7ca87a26dbb (diff) | |
download | perl-libnet-2c160b441ccc609bf4397ad7dd783c68b8cac4c2.tar.gz |
Fix $smtp->auth($sasl)
Try the AUTH mechanism (if present) in the Authen::SASL object before falling back on other mechanisms. Resolves CPAN RT#99415.
-rw-r--r-- | Changes | 4 | ||||
-rw-r--r-- | lib/Net/SMTP.pm | 2 |
2 files changed, 4 insertions, 2 deletions
@@ -1,6 +1,8 @@ libnet 3.02 -- TODO - * TODO + * Fix $smtp->auth($sasl) to try the AUTH mechanism (if present) in the + Authen::SASL object before falling back on other mechanisms. [Resolves + CPAN RT#99415] libnet 3.01 -- Thu Oct 09 2014 diff --git a/lib/Net/SMTP.pm b/lib/Net/SMTP.pm index df90227..feeb1da 100644 --- a/lib/Net/SMTP.pm +++ b/lib/Net/SMTP.pm @@ -193,8 +193,8 @@ sub auth { if $self->debug; $mechanisms =~ s/\b\Q$failed_mechanism\E\b//; last unless $mechanisms =~ /\S/; + $sasl->mechanism($mechanisms); } - $sasl->mechanism($mechanisms); # We should probably allow the user to pass the host, but I don't # currently know and SASL mechanisms that are used by smtp that need it |