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

Re: [PATCH 0/4] credential: documentation updates for maint

From
Jeff King <peff@peff.net>
Date
May 7, 2020, 22:17 UTC
Message-ID
<20200507221748.GA41996@coredump.intra.peff.net>
In-Reply-To
<20200507212348.GA19917@Carlos-MBP>
On Thu, May 07, 2020 at 02:23:48PM -0700, Carlo Marcelo Arenas Belón wrote:
Show 27 quoted lines
> On Thu, May 07, 2020 at 04:59:09PM -0400, Jeff King wrote:
> > On Wed, May 06, 2020 at 04:28:48PM -0700, Carlo Marcelo Arenas Belón wrote:
> > 
> > > Subject: [RFC PATCH 5/4] credential: document encoding assumptions for values
> > > 
> > > Because of the similarity on the names of the keys with what is defined
> > > in RFC3986 is easy to assume the same rules would apply here.
> > > 
> > > Make sure that the format and encoding is well defined to avoid helper
> > > developers assuming incorrectly.
> > 
> > I'm not sure this really clarifies anything, because it just says "no
> > assumptions can be made". Which I guess is a statement, but I'm not sure
> > what I'd do with it as a helper developer.
> 
> not sure what part of the added lines you are referring to but I am happy
> to provide some examples of what I would expect to clarify below from
> what I'd seen from some helpers that I'd read the code from recently.
> 
> as an example, I would expect the helper developer to start checking for
> the locale and calling iconv in cases where it is not using utf-8, before
> sending it to a storage that requires that (ex: osxkeychain), or utf-16
> (maybe in windows).
> 
> osxkeychain will probably also check for protocol in a case insensitive
> way to make sure it is not ignoring credentials that are not all lowercase
> as it does now.
Those things all seem reasonable. I just meant that reading:
  No assumptions of case insensitivity can be made on their contents and
  if a specific encoding is required (e.g. "UTF-8") then the byte
  contents should be re-encoded before use.

didn't point me in a useful direction there. Reading it again, I'm still not sure if you're trying to say that helpers should match protocols case-insensitively or not. And TBH, I don't think it matters that much. It's a quality-of-implementation issue for helpers, and if nobody is complaining about their behavior, does it really matter? I'd be more concerned if doing the wrong thing involved a security vulnerability, but the worst case with case-insensitivity is probably that they _fail_ to match a credential when they should.

Likewise for weird encodings, unless an attacker can somehow come up with a hostname byte sequence that a helper mistakes for another legitimate hostname, _and_ that can be used sensibly by git or curl.

-Peff
Previous: Carlo Marcelo Arenas BelónNext: Carlo Marcelo Arenas Belón
Message 20 of 29 in “credential: minor documentation fixes”
  1. credential: minor documentation fixesCarlo Marcelo Arenas Belón, May 3, 2020
  2. Jeff KingMay 3, 2020
  3. Carlo Marcelo Arenas BelónMay 4, 2020
  4. Jeff KingMay 4, 2020
  5. Carlo Marcelo Arenas BelónMay 4, 2020
  6. Jeff KingMay 4, 2020
  7. Carlo Marcelo Arenas BelónMay 4, 2020
  8. Jeff KingMay 4, 2020
  9. 0/4 credential: documentation updates for maintCarlo Marcelo Arenas Belón, May 5, 2020
  10. 1/4 credential: update description for credential_from_url_gentlyCarlo Marcelo Arenas Belón, May 5, 2020
  11. 2/4 credential: correct order of parameters for credential_matchCarlo Marcelo Arenas Belón, May 5, 2020
  12. 4/4 credential: document protocol updatesCarlo Marcelo Arenas Belón, May 5, 2020
  13. Jeff KingMay 6, 2020
  14. 3/4 credential: update gitcredentials documentationCarlo Marcelo Arenas Belón, May 5, 2020
  15. Jeff KingMay 6, 2020
  16. Jeff KingMay 6, 2020
  17. Carlo Marcelo Arenas BelónMay 6, 2020
  18. Jeff KingMay 7, 2020
  19. Carlo Marcelo Arenas BelónMay 7, 2020
  20. Jeff KingMay 7, 2020
  21. Carlo Marcelo Arenas BelónMay 7, 2020
  22. 0/4 credential: documentation updates for maintCarlo Marcelo Arenas Belón, May 6, 2020
  23. 1/4 credential: update description for credential_from_url_gentlyCarlo Marcelo Arenas Belón, May 6, 2020
  24. 2/4 credential: correct order of parameters for credential_matchCarlo Marcelo Arenas Belón, May 6, 2020
  25. 3/4 credential: update gitcredentials documentationCarlo Marcelo Arenas Belón, May 6, 2020
  26. Jeff KingMay 7, 2020
  27. Junio C HamanoMay 7, 2020
  28. 4/4 credential: document protocol updatesCarlo Marcelo Arenas Belón, May 6, 2020
  29. Jeff KingMay 7, 2020

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.