From: David Turner <novalis@novalis.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [REGRESSION 2.10.2] problematic "empty auth" changes
Date: Thu, 08 Dec 2016 16:12:32 -0500 [thread overview]
Message-ID: <1481231552.20894.20.camel@frank> (raw)
In-Reply-To: <alpine.DEB.2.20.1612081538260.23160@virtualbox>
On Thu, 2016-12-08 at 15:47 +0100, Johannes Schindelin wrote:
> Hi Dave,
>
> I got a couple of bug reports that claim that 2.10.2 regressed on using
> network credentials. That is, users regularly hit Enter twice when being
> asked for user name and password while fetching via https://, and cURL
> automatically used to fall back to using the login credentials (i.e.
> authenticating via the Domain controller).
>
> Turns out those claims are correct: hitting Enter twice (or using URLs
> with empty user name/password such as https://:tfs:8080/) work in 2.10.1
> and yield "Authentication failed" in 2.10.2.
>
> I tracked this down to 5275c3081c (http: http.emptyauth should allow empty
> (not just NULL) usernames, 2016-10-04) which all of a sudden disallowed
> empty user names (and now only handles things correctly when
> http.emptyAuth is set to true specifically).
>
> This smells like a real bad regression to me, certainly given the time I
> had to spend to figure this out (starting from not exactly helpful bug
> reports, due to being very specific to their setups being private).
>
> I am *really* tempted to change the default of http.emptyAuth to true, *at
> least* for Windows (where it is quite common to use your login credentials
> to authenticate to corporate servers).
>
> Before I do anything rash, though: Do you see any downside to that?
I know of no reason that shouldn't work. Indeed, it's what we use do
internally. So far, nobody has reported problems. That said, we have
exactly three sets of git servers that most users talk to (two different
internal; and occasionally github.com for external stuff). So our
coverage is not very broad.
If you're going to do it, tho, don't just do it for Windows users -- do
it for everyone. Plenty of Unix clients connect to Windows-based auth
systems.
That said, I could imagine that there are cases where it would cause
failures for a different set of users. I don't know of any off the top
of my head, but this is not my area of expertise.
We could move closer to the old behavior with something like:
if (!http_auth.username || !*http_auth.username) {
if (curl_empty_auth)
curl_easy_setopt(result, CURLOPT_USERPWD, ":");
if (!http_auth.username)
return;
}
This is very ad-hoc, in that I have not examined exactly when
http_auth.username would be null vs empty; it merely attempts to get as
close as possible to the old behavior.
[Side note: I was curious if 26a7b23429 would have been a better fix for
our problem. It appears that the answer is no; using that patch but
minus my 5275c3081c does not work for us.]
next prev parent reply other threads:[~2016-12-09 9:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-08 14:47 [REGRESSION 2.10.2] problematic "empty auth" changes Johannes Schindelin
2016-12-08 21:12 ` David Turner [this message]
2016-12-09 15:58 ` Johannes Schindelin
2016-12-09 19:31 ` Junio C Hamano
2016-12-09 22:19 ` brian m. carlson
2016-12-10 14:52 ` Johannes Schindelin
2016-12-10 15:23 ` brian m. carlson
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=1481231552.20894.20.camel@frank \
--to=novalis@novalis.org \
--cc=Johannes.Schindelin@gmx.de \
--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).