summaryrefslogtreecommitdiff
path: root/credential-store.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-05-08 21:25:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-05-08 21:25:01 (GMT)
commit933fdf8784d0fedaa259c6caf90115cfa7d21184 (patch)
treec92c2e07929b355ea35e337033fb0e5b54fb8785 /credential-store.c
parentf4675f3d47429ddaf1683dc978ffef341bffb4b5 (diff)
parentc03859a66525c6bdc5cd3c02b31f06cfdd80b595 (diff)
downloadgit-933fdf8784d0fedaa259c6caf90115cfa7d21184.zip
git-933fdf8784d0fedaa259c6caf90115cfa7d21184.tar.gz
git-933fdf8784d0fedaa259c6caf90115cfa7d21184.tar.bz2
Merge branch 'cb/credential-store-ignore-bogus-lines'
With the recent tightening of the code that is used to parse various parts of a URL for use in the credential subsystem, a hand-edited credential-store file causes the credential helper to die, which is a bit too harsh to the users. Demote the error behaviour to just ignore and keep using well-formed lines instead. * cb/credential-store-ignore-bogus-lines: credential-store: ignore bogus lines from store file credential-store: document the file format a bit more
Diffstat (limited to 'credential-store.c')
-rw-r--r--credential-store.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/credential-store.c b/credential-store.c
index c010497..294e771 100644
--- a/credential-store.c
+++ b/credential-store.c
@@ -24,8 +24,8 @@ static int parse_credential_file(const char *fn,
}
while (strbuf_getline_lf(&line, fh) != EOF) {
- credential_from_url(&entry, line.buf);
- if (entry.username && entry.password &&
+ if (!credential_from_url_gently(&entry, line.buf, 1) &&
+ entry.username && entry.password &&
credential_match(c, &entry)) {
found_credential = 1;
if (match_cb) {