All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Graham Barr <gbarr@pobox.com>
Subject: Re: [PATCH] git-send-email: Add AUTH LOGIN support
Date: Thu, 18 Aug 2011 18:16:25 -0700	[thread overview]
Message-ID: <1313716585.11178.2.camel@Joe-Laptop> (raw)
In-Reply-To: <1312608114.6419.18.camel@Joe-Laptop>

On Fri, 2011-08-05 at 22:21 -0700, Joe Perches wrote:
> On Fri, 2011-08-05 at 21:54 -0700, Junio C Hamano wrote:
> > Joe Perches <joe@perches.com> writes:
> > > The current perl Net::SMTP support will not use AUTH LOGIN
> > > when other authentication options are available.
> > Even after reading this excuse,...
> > > +			if (defined $smtp_auth && $smtp_auth =~ /^login$/i) {
> > > +
> > > +			    $smtp->datasend("AUTH LOGIN\n");
> > > +			    $smtp->response();
> > > +			    $smtp->datasend(encode_base64("$smtp_authuser"));
> > > +			    $smtp->response();
> > > +			    $smtp->datasend(encode_base64("$smtp_authpass"));
> > > +			    $smtp->response();
> > > +
> > > +			} else {
> > > +
> > > +			    $auth ||= $smtp->auth( $smtp_authuser, $smtp_authpass ) or die $smtp->message;
> > > +			}
> > ... this makes me feel dirty X-(. Not the desire to force "AUTH LOGIN",
> > but the implementation to hand-roll the protocol exchange.
> > I'd rather want to know _why_ Net::SMTP does not support it in the first
> > place, and what it does for "other authentication options" that are
> > available. Does it try them in turn until it finds the one that works? Why
> > doesn't it fall back on "AUTH LOGIN" then?
> > Specifically, if there is a reason to avoid this plaintext authentication
> > method when other options are _available_ (which presumably would be the
> > reason why Net::SMTP chooses not to support it), and if there is a reason
> > on the user's side to _force_ this method even when people who wrote
> > Net::SMTP does not recommend it be used, wouldn't it be natural to expect
> > that there should be a way to configure the connection to use it, without
> > resorting to coding the protocol exchange by hand line this?
> 
> I needed something now.
> 
> You are right but I believe it would take too long
> to get updates to Net::SMTP in place. Doing this
> admitted ugliness in git-send-email works for me and
> seems to me to be appropriate for now.
> 
> I looked, there isn't a method to force a particular
> AUTH type documented.  I also didn't care to rewrite
> Net::SMTP right now.  This "works for me"...
> 
> > It probably is not as simple as installing Authen::SASL::*::LOGIN, but
> > still...

I think my patch should be applied until Net::SMTP is updated.

  reply	other threads:[~2011-08-19  1:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-06  0:40 [PATCH] git-send-email: Add AUTH LOGIN support Joe Perches
2011-08-06  4:54 ` Junio C Hamano
2011-08-06  5:21   ` Joe Perches
2011-08-19  1:16     ` Joe Perches [this message]
2011-08-19 23:09       ` Junio C Hamano
2011-08-19 23:24         ` Joe Perches
2011-08-20  1:01           ` Junio C Hamano
2011-09-24 15:49   ` [PATCH] send-email: auth plain/login fix Zbigniew Jędrzejewski-Szmek
2011-09-26 16:38     ` Junio C Hamano
2011-09-26 16:59       ` Joe Perches
2011-09-26 17:24     ` Jakub Narebski
2011-09-27 21:36       ` [PATCH v2] " Zbigniew Jędrzejewski-Szmek
2011-09-27 21:48         ` Jeff King
2011-09-28 10:26       ` [PATCH v3] " Zbigniew Jędrzejewski-Szmek
2011-09-28 22:00         ` Junio C Hamano
2011-09-29 14:16           ` [PATCH v4] " Zbigniew Jędrzejewski-Szmek
2011-09-29 15:01             ` Joe Perches
2011-09-29 17:02               ` [PATCH] " Zbigniew Jędrzejewski-Szmek
2011-09-29 18:12                 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1313716585.11178.2.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=gbarr@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.