git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-send-email: Add AUTH LOGIN support

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 6, 2011, 04:54 UTC
Message-ID
<7vzkjn16n6.fsf@alter.siamese.dyndns.org>
In-Reply-To
<c1be0c3bd05779897fdc92907fe65d84c88ac72b.1312591104.git.joe@perches.com>
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,...
Show 13 quoted lines
> +			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?

It probably is not as simple as installing Authen::SASL::*::LOGIN, but still...

Previous: Joe PerchesNext: Joe Perches
Message 2 of 19 in “git-send-email: Add AUTH LOGIN support”
  1. git-send-email: Add AUTH LOGIN supportJoe Perches, Aug 6, 2011
  2. Junio C HamanoAug 6, 2011
  3. Joe PerchesAug 6, 2011
  4. Joe PerchesAug 19, 2011
  5. Junio C HamanoAug 19, 2011
  6. Joe PerchesAug 19, 2011
  7. Junio C HamanoAug 20, 2011
  8. send-email: auth plain/login fixZbigniew Jędrzejewski-Szmek, Sep 24, 2011
  9. Junio C HamanoSep 26, 2011
  10. Joe PerchesSep 26, 2011
  11. Jakub NarebskiSep 26, 2011
  12. send-email: auth plain/login fixZbigniew Jędrzejewski-Szmek, Sep 27, 2011
  13. Jeff KingSep 27, 2011
  14. send-email: auth plain/login fixZbigniew Jędrzejewski-Szmek, Sep 28, 2011
  15. Junio C HamanoSep 28, 2011
  16. send-email: auth plain/login fixZbigniew Jędrzejewski-Szmek, Sep 29, 2011
  17. Joe PerchesSep 29, 2011
  18. send-email: auth plain/login fixZbigniew Jędrzejewski-Szmek, Sep 29, 2011
  19. Junio C HamanoSep 29, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.