Skip to content

credentials: drop plaintext auth when the helper erase fails - #7476

Open
locker95 wants to merge 1 commit into
docker:masterfrom
locker95:fix/logout-helper-plaintext
Open

locker95 wants to merge 1 commit into
docker:masterfrom
locker95:fix/logout-helper-plaintext

Conversation

@locker95

@locker95 locker95 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

docker logout prints that it removed the credentials, then asks the cred helper to erase. If that helper fails, the auth entry in config.json was left as-is. Logout also tries the http:// and https:// spellings, and those no-op erases counted as success, so there was no warning either.

The plaintext copy is removed even when the helper returns an error. The helper error is still returned.

Fixes #2605

docker logout left the config.json auth entry in place when a
credHelper was set and the helper program failed. Other server
address spellings still erased cleanly, so the command reported
success.

Fixes docker#2605

Signed-off-by: Dean Chen <862469039@qq.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docker logout doesn't work with multiple entries with the same key

2 participants