Skip to content

Commit 70dadd5

Browse files
committed
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
2 parents f71ed54 + 8f1f202 commit 70dadd5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

contrib/credential/libsecret/git-credential-libsecret.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ static int keyring_get(struct credential *c)
164164
if (g_strv_length(parts) >= 1) {
165165
g_free(c->password);
166166
c->password = g_strdup(parts[0]);
167+
} else {
168+
g_free(c->password);
169+
c->password = g_strdup("");
167170
}
168171
for (int i = 1; i < g_strv_length(parts); i++) {
169172
if (g_str_has_prefix(parts[i], "password_expiry_utc=")) {

0 commit comments

Comments
 (0)