summaryrefslogtreecommitdiff
path: root/credential.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-05-10 17:23:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2023-05-10 17:23:27 (GMT)
commitfbbf60a9bc4d7139efa70a0246cec2b3f2cc63fb (patch)
tree6f6eba4352c9ee5d00fd0ee61c0945ba02b94a26 /credential.c
parent6710b68db184fee3b0524d188c1e380f2650215e (diff)
parent0a3a972c163b2c5ed81a8e2c12fbf0c53eeb210c (diff)
downloadgit-fbbf60a9bc4d7139efa70a0246cec2b3f2cc63fb.zip
git-fbbf60a9bc4d7139efa70a0246cec2b3f2cc63fb.tar.gz
git-fbbf60a9bc4d7139efa70a0246cec2b3f2cc63fb.tar.bz2
Merge branch 'tb/credential-long-lines'
The implementation of credential helpers used fgets() over fixed size buffers to read protocol messages, causing the remainder of the folded long line to trigger unexpected behaviour, which has been corrected. * tb/credential-long-lines: contrib/credential: embiggen fixed-size buffer in wincred contrib/credential: avoid fixed-size buffer in libsecret contrib/credential: .gitignore libsecret build artifacts contrib/credential: remove 'gnome-keyring' credential helper contrib/credential: avoid fixed-size buffer in osxkeychain t/lib-credential.sh: ensure credential helpers handle long headers credential.c: store "wwwauth[]" values in `credential_read()`
Diffstat (limited to 'credential.c')
-rw-r--r--credential.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/credential.c b/credential.c
index a600d0c..7da326a 100644
--- a/credential.c
+++ b/credential.c
@@ -239,6 +239,8 @@ int credential_read(struct credential *c, FILE *fp)
} else if (!strcmp(key, "path")) {
free(c->path);
c->path = xstrdup(value);
+ } else if (!strcmp(key, "wwwauth[]")) {
+ strvec_push(&c->wwwauth_headers, value);
} else if (!strcmp(key, "password_expiry_utc")) {
errno = 0;
c->password_expiry_utc = parse_timestamp(value, NULL, 10);