diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-02-27 16:04:32 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-02-27 16:04:32 -0800 |
| commit | 70dadd510be0c4673eb81138d3daeefb01afae2a (patch) | |
| tree | 9288def578f6a29263bae38a26a7185a8fe75dd4 | |
| parent | f71ed54f4dce1f2c0ccf07fb6bcf0128414272f9 (diff) | |
| parent | 8f1f2023b758179b31188b665496b514dbb952d6 (diff) | |
| download | git-70dadd510be0c4673eb81138d3daeefb01afae2a.tar.gz | |
Merge branch 'mh/libsecret-empty-password-fix'
Credential helper based on libsecret (in contrib/) has been updated
to handle an empty password correctly.
* mh/libsecret-empty-password-fix:
libsecret: retrieve empty password
| -rw-r--r-- | contrib/credential/libsecret/git-credential-libsecret.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/credential/libsecret/git-credential-libsecret.c b/contrib/credential/libsecret/git-credential-libsecret.c index 215a81d8ba..90034d0cf1 100644 --- a/contrib/credential/libsecret/git-credential-libsecret.c +++ b/contrib/credential/libsecret/git-credential-libsecret.c @@ -164,6 +164,9 @@ static int keyring_get(struct credential *c) if (g_strv_length(parts) >= 1) { g_free(c->password); c->password = g_strdup(parts[0]); + } else { + g_free(c->password); + c->password = g_strdup(""); } for (int i = 1; i < g_strv_length(parts); i++) { if (g_str_has_prefix(parts[i], "password_expiry_utc=")) { |
