From: David Turner <dturner@twosigma.com>
To: git@vger.kernel.org, sandals@crustytoothpaste.net
Cc: David Turner <dturner@twosigma.com>
Subject: [PATCH] http: http.emptyauth should allow empty (not just NULL) usernames
Date: Mon, 3 Oct 2016 13:19:28 -0400 [thread overview]
Message-ID: <1475515168-29679-1-git-send-email-dturner@twosigma.com> (raw)
When using kerberos authentication, one URL pattern which is
allowed is http://@gitserver.example.com. This leads to a username
of zero-length, rather than a NULL username. But the two cases
should be treated the same by http.emptyauth.
Signed-off-by: David Turner <dturner@twosigma.com>
---
http.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/http.c b/http.c
index 82ed542..bd0dba2 100644
--- a/http.c
+++ b/http.c
@@ -351,7 +351,7 @@ static int http_options(const char *var, const char *value, void *cb)
static void init_curl_http_auth(CURL *result)
{
- if (!http_auth.username) {
+ if (!http_auth.username || !*http_auth.username) {
if (curl_empty_auth)
curl_easy_setopt(result, CURLOPT_USERPWD, ":");
return;
--
2.8.0.rc4.22.g8ae061a
next reply other threads:[~2016-10-03 17:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-03 17:19 David Turner [this message]
2016-10-03 21:01 ` [PATCH] http: http.emptyauth should allow empty (not just NULL) usernames Jeff King
2016-10-03 21:54 ` David Turner
2016-10-03 21:58 ` Jeff King
2016-10-03 22:26 ` David Turner
2016-10-03 22:54 ` Junio C Hamano
2016-10-04 0:07 ` 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=1475515168-29679-1-git-send-email-dturner@twosigma.com \
--to=dturner@twosigma.com \
--cc=git@vger.kernel.org \
--cc=sandals@crustytoothpaste.net \
/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).