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

Re: contrib/credential/netrc/git-credential-netrc: Use of uninitialized value in string

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 27, 2013, 03:56 UTC
Message-ID
<xmqqr4dfhjmg.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CALWbr2ynAvevTxFd3duAfFzgv0DCGTDxFUaniW-8hM+eoLiOEw@mail.gmail.com>
Antoine Pelisse <apelisse@gmail.com> writes:
> I've tried to use the netrc credential with git-send-email
> (v1.8.4-rc2), and I've had the following log (running with -d -v):

Peff what do you think? From credential layer's point of view, I think we make it totally up to the helper to decide if a request matches what it supports, and if a particular helper wants to make sure it is asked for a specific protocol, that is an OK thing to do, but it feels unnecessarily unfriendly and treating missing proto specification as a wildcard to talk to the specified host over any protocol may not hurt, I would think.

Show 36 quoted lines
> We were given search token protocol and value smtp
> We were given search token host and value smtp.gmail.com:587
> We were given search token username and value apelisse@gmail.com
> Searching for host = smtp.gmail.com:587
> Searching for password = (any value)
> Searching for path = (any value)
> Searching for protocol = smtp
> Searching for username = apelisse@gmail.com
> Using GPG to open /home/antoine/.authinfo.gpg: [gpg --decrypt
> /home/antoine/.authinfo.gpg]
>
> You need a passphrase to unlock the secret key for
> user: "Antoine Pelisse <apelisse@gmail.com>"
> 2048-bit RSA key, ID DE2A8792, created 2010-12-31 (main key ID A066A853)
>
> gpg: encrypted with 2048-bit RSA key, ID DE2A8792, created 2010-12-31
>       "Antoine Pelisse <apelisse@gmail.com>"
> compare host [smtp.gmail.com:587] to [smtp.gmail.com:587] (entry:
> password=secret, username=apelisse@gmail.com, host=smtp.gmail.com:587)
> OK: any value satisfies check password
> OK: any value satisfies check path
> Use of uninitialized value $_[2] in printf at
> /home/antoine/code/git/contrib/credential/netrc/git-credential-netrc
> line 419.
> compare protocol [] to [smtp] (entry: password=secret,
> username=apelisse@gmail.com, host=smtp.gmail.com:587)
> Use of uninitialized value in string eq at
> /home/antoine/code/git/contrib/credential/netrc/git-credential-netrc
> line 378.
>
> I can fix the problem by adding a "protocol smtp" to the matching
> line, but I wonder why this would be necessary ? After all, if host
> smtp.gmail.com:587 matches, do we need to match the protocol ?
>
> Cheers,
> Antoine
Previous: Antoine PelisseNext: Jeff King
Message 2 of 6 in “contrib/credential/netrc/git-credential-netrc: Use of uninitialized value in string”
  1. Antoine PelisseAug 24, 2013
  2. Junio C HamanoAug 27, 2013
  3. Jeff KingAug 27, 2013
  4. Ted ZlatanovSep 3, 2013
  5. Jeff KingSep 3, 2013
  6. Ted ZlatanovOct 8, 2013

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.