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

[PATCH] http: http.emptyauth should allow empty (not just NULL) usernames

From
David Turner <dturner@twosigma.com>
Date
Oct 3, 2016, 17:19 UTC
Message-ID
<1475515168-29679-1-git-send-email-dturner@twosigma.com>

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: Jeff King
Message 1 of 7 in “http: http.emptyauth should allow empty (not just NULL) usernames”
  1. http: http.emptyauth should allow empty (not just NULL) usernamesDavid Turner, Oct 3, 2016
  2. Jeff KingOct 3, 2016
  3. David TurnerOct 3, 2016
  4. Jeff KingOct 3, 2016
  5. David TurnerOct 3, 2016
  6. Junio C HamanoOct 3, 2016
  7. brian m. carlsonOct 4, 2016

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.