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

[PATCH v2 0/2] credential: improvements to erase in helpers

From
M Hickford via GitGitGadget <gitgitgadget@gmail.com>
Date
Jun 14, 2023, 21:40 UTC
Message-ID
<pull.1525.v2.git.git.1686778838.gitgitgadget@gmail.com>
In-Reply-To
<pull.1525.git.git.1686741785.gitgitgadget@gmail.com>
M Hickford (2):
  credential: avoid erasing distinct password
  credential: erase all matching credentials
 Documentation/git-credential.txt   |  4 +-
 Documentation/gitcredentials.txt   |  2 +-
 builtin/credential-cache--daemon.c | 11 ++++--
 builtin/credential-store.c         | 21 ++++++-----
 credential.c                       | 11 +++---
 credential.h                       |  2 +-
 t/lib-credential.sh                | 59 ++++++++++++++++++++++++++++++
 7 files changed, 88 insertions(+), 22 deletions(-)
base-commit: fe86abd7511a9a6862d5706c6fa1d9b57a63ba09
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1525%2Fhickford%2Ferase-test-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1525/hickford/erase-test-v2
Pull-Request: https://github.com/git/git/pull/1525
Range-diff vs v1:
 1:  35ee1795bcd = 1:  35ee1795bcd credential: avoid erasing distinct password
 2:  fcdb579263f ! 2:  9b12f17dc7e credential: erase all matching credentials
     @@ Metadata
       ## Commit message ##
          credential: erase all matching credentials
      
     -    Users expect that
     -    `echo "url=https://example.com" | git credential reject` or
     -    `echo "url=https://example.com\nusername=tim" | git credential reject`
     -    erase all matching credentials.
     +    `credential reject` sends the erase action to each helper, but the
     +    exact behaviour of erase isn't specified in documentation or tests.
     +    Some helpers (such as credential-libsecret) delete all matching
     +    credentials, others (such as credential-cache and credential-store)
     +    delete at most one matching credential.
      
     -    Fixes for credential-cache and credential-store.
     +    Test that helpers erase all matching credentials. This behaviour is
     +    easiest to reason about. Users expect that `echo
     +    "url=https://example.com" | git credential reject` or `echo
     +    "url=https://example.com\nusername=tim" | git credential reject` erase
     +    all matching credentials.
     +
     +    Fix credential-cache and credential-store.
      
          Signed-off-by: M Hickford <mirth.hickford@gmail.com>
      
-- 
gitgitgadget
Previous: M HickfordNext: M Hickford via GitGitGadget
Message 6 of 26 in “credential: improvements to erase in helpers”
  1. 0/2 credential: improvements to erase in helpersM Hickford via GitGitGadget, Jun 14, 2023
  2. 1/2 credential: avoid erasing distinct passwordM Hickford via GitGitGadget, Jun 14, 2023
  3. 2/2 credential: erase all matching credentialsM Hickford via GitGitGadget, Jun 14, 2023
  4. Junio C HamanoJun 14, 2023
  5. M HickfordJun 14, 2023
  6. 0/2 credential: improvements to erase in helpersM Hickford via GitGitGadget, Jun 14, 2023
  7. 1/2 credential: avoid erasing distinct passwordM Hickford via GitGitGadget, Jun 14, 2023
  8. Jeff KingJun 14, 2023
  9. M HickfordJun 15, 2023
  10. 2/2 credential: erase all matching credentialsM Hickford via GitGitGadget, Jun 14, 2023
  11. Jeff KingJun 14, 2023
  12. M HickfordJun 15, 2023
  13. Junio C HamanoJun 14, 2023
  14. Jeff KingJun 14, 2023
  15. 0/2 credential: improvements to erase in helpersM Hickford via GitGitGadget, Jun 15, 2023
  16. 1/2 credential: avoid erasing distinct passwordM Hickford via GitGitGadget, Jun 15, 2023
  17. Jeff KingJun 15, 2023
  18. 2/2 credential: erase all matching credentialsM Hickford via GitGitGadget, Jun 15, 2023
  19. Jeff KingJun 15, 2023
  20. 0/2 credential: improvements to erase in helpersM Hickford via GitGitGadget, Jun 15, 2023
  21. 1/2 credential: avoid erasing distinct passwordM Hickford via GitGitGadget, Jun 15, 2023
  22. 2/2 credential: erase all matching credentialsM Hickford via GitGitGadget, Jun 15, 2023
  23. Junio C HamanoJun 15, 2023
  24. Jeff KingJun 15, 2023
  25. Junio C HamanoJun 15, 2023
  26. Junio C HamanoJun 16, 2023

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.