diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-05-09 00:25:01 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-09 00:25:01 +0300 |
commit | 933fdf8784d0fedaa259c6caf90115cfa7d21184 (patch) | |
tree | c92c2e07929b355ea35e337033fb0e5b54fb8785 /credential-store.c | |
parent | f4675f3d47429ddaf1683dc978ffef341bffb4b5 (diff) | |
parent | c03859a66525c6bdc5cd3c02b31f06cfdd80b595 (diff) |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/credential-store.c b/credential-store.c index c010497cb2..294e771681 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) { |