From: Jeff King <peff@peff.net>
To: Brian Norris <computersforpeace@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-send-email: allow overriding smtp-encryption config to 'none'
Date: Wed, 15 Feb 2012 17:06:29 -0500 [thread overview]
Message-ID: <20120215220629.GA17672@sigill.intra.peff.net> (raw)
In-Reply-To: <1329342178-14540-1-git-send-email-computersforpeace@gmail.com>
On Wed, Feb 15, 2012 at 01:42:58PM -0800, Brian Norris wrote:
> According to the manpage:
>
> --smtp-encryption=<encryption>
> Specify the encryption to use, either ssl or tls. Any other value
> reverts to plain SMTP. Default is the value of
> sendemail.smtpencryption.
>
> However, if I have already set sendemail.smtpencryption but try to override
> it with something like 'no', the authentication code block still tries to ask
> for a password (and fails).
Sounds reasonable.
> This patch forces $smtp_encryption to 'none' when a proper encryption type is
> not provided, then checks $smtp_encryption before proceeding to authentication.
Defaulting everything except "ssl" or "tls" to "none" seems risky to me.
If I am understanding your patch correctly, then doing this:
git send-email --smtp-encryption=SSL
will silently treat that as "don't do encryption", which could have
surprising security implications for the user. I chose all-caps as it is
an obvious mistake to make. We probably should treat it the same as
lowercase "ssl", but the same argument applies to other typos like
"tsl".
It seems like a much safer default would be to die() on an invalid
encryption specifier.
-Peff
next prev parent reply other threads:[~2012-02-15 22:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-15 21:42 [PATCH] git-send-email: allow overriding smtp-encryption config to 'none' Brian Norris
2012-02-15 22:06 ` Jeff King [this message]
2012-02-15 23:49 ` Brian Norris
2012-02-16 0:49 ` Jeff King
2012-02-18 5:27 ` Brian Norris
2012-02-18 6:24 ` Jeff King
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=20120215220629.GA17672@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=computersforpeace@gmail.com \
--cc=git@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).