public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Jan Viktorin <viktorin@rehivetech•com>
Cc: Eric Sunshine <sunshine@sunshineco•com>,
	Git List <git@vger•kernel.org>,
	"brian m. carlson" <sandals@crustytoothpaste•net>
Subject: Re: [PATCH v1] send-email: provide whitelist of SMTP AUTH mechanisms
Date: Sun, 02 Aug 2015 11:28:49 -0700	[thread overview]
Message-ID: <xmqqwpxd8rz2.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20150802184353.2a5da936@jvn> (Jan Viktorin's message of "Sun, 2 Aug 2015 18:43:53 +0200")

Jan Viktorin <viktorin@rehivetech•com> writes:

> Authen::SASL gives:
>
> No SASL mechanism found
>  at /usr/share/perl5/vendor_perl/Authen/SASL.pm line 77.
>  at /usr/share/perl5/core_perl/Net/SMTP.pm line 207.
>
> The SASL library does not check validity of mechanisms'
> names (or I did not find it). It just tries to load one
> that matches both the ours and the server side ones.
> ...
> I would like to include the regex check based on RFC 4422
> as I've already mentioned. at least, it filters out the
> unwanted characters like '/', '.', etc.

Hmm, is there a way to ask Authen::SASL what SASL mechanism the
installed system supports?  If so, the enhancement you are adding
could be

	my @to_use;
	if ($smtp_auth_whitelist is supplied) {
		my @installed = Authen::SASL::list_mechanisms();
                for (@installed) {
                	if ($_ is whitelisted) {
				push @to_use, $_;
			}
		}
	}

and @to_use can later be supplied when we open the connection as the
list of mechanisms we allow the library to pick.

Just my $.02

  reply	other threads:[~2015-08-02 18:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-31 23:33 [PATCH v1] send-email: provide whitelist of SMTP AUTH mechanisms Jan Viktorin
2015-08-01  9:33 ` Eric Sunshine
2015-08-01 18:19   ` Jan Viktorin
2015-08-02  9:41     ` Eric Sunshine
2015-08-02 16:43       ` Jan Viktorin
2015-08-02 18:28         ` Junio C Hamano [this message]
2015-08-03 10:24           ` Jan Viktorin
2015-08-03 19:53             ` Junio C Hamano
2015-08-02 18:10       ` Junio C Hamano
2015-08-01 16:49 ` brian m. carlson
2015-08-01 18:21   ` Jan Viktorin

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=xmqqwpxd8rz2.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=sandals@crustytoothpaste$(echo .)net \
    --cc=sunshine@sunshineco$(echo .)com \
    --cc=viktorin@rehivetech$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox