Commit Graph

10122 Commits

Author SHA1 Message Date
Carlos Martín Nieto
df4dfaadcf Merge pull request #4055 from ethomson/ethomson/ntlm
WinHTTP: support best auth mechanism
2017-01-16 12:29:52 +00:00
Edward Thomson
4e4a1460eb WinHTTP: support best auth mechanism
For username/password credentials, support NTLM or Basic (in that order
of priority).  Use the WinHTTP built-in authentication support for both,
and maintain a bitfield of the supported mechanisms from the response.
2017-01-16 11:21:26 +00:00
Edward Thomson
cb76eed5ce Merge pull request #4054 from jfultz/jfultz/fix_GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH
Fix handling of GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH flag.
2017-01-14 17:41:49 +00:00
Carlos Martín Nieto
2854e61956 Merge pull request #4061 from libgit2/ethomson/merge_opts
merge: set default rename threshold
2017-01-14 17:12:23 +00:00
lhchavez
f5586f5c73 Addressed review feedback 2017-01-14 16:37:00 +00:00
Edward Thomson
07bb8078cb CHANGELOG: update GIT_MERGE_OPTIONS_INIT changes 2017-01-14 16:01:53 +00:00
Etienne Samson
49be45a189 pack: report revwalk error 2017-01-13 21:48:20 +01:00
Etienne Samson
b0014063b2 patch: memory leak of patch.base.diff_opts.new|old_prefix 2017-01-13 21:48:20 +01:00
Etienne Samson
8a349bf2a1 ignore: there must be a repository
Otherwise we'll NULL-dereference in git_attr_cache__init
2017-01-13 21:48:20 +01:00
Carlos Martín Nieto
a6d833a29e Merge pull request #4049 from libgit2/ethomson/error_msgs
giterr_set: consistent error messages
2017-01-13 17:05:58 +01:00
Patrick Steinhardt
f9ea8c6a14 examples: general: fix memory leaks 2017-01-12 22:04:36 +01:00
Patrick Steinhardt
ed2b1c7e75 examples: general: display config only if it was found 2017-01-12 22:01:45 +01:00
Patrick Steinhardt
5aa101078e examples: general: narrow down scope of loop variables 2017-01-12 22:01:23 +01:00
Patrick Steinhardt
8572e2252b examples: general: clean up committer/author variables 2017-01-12 22:00:53 +01:00
Edward Thomson
ffe259d9e5 Merge pull request #4074 from fcharlie/master
fix examples/network/clone.c: heap-buffer-overflow
2017-01-11 11:52:06 +00:00
Carlos Martín Nieto
ee89941fa2 Merge remote-tracking branch 'upstream/maint/v0.25' 2017-01-09 21:00:07 +00:00
Carlos Martín Nieto
2fcb8705e5 Merge pull request #4076 from libgit2/cmn/sec-update-25
security updates for v0.25
2017-01-09 20:26:45 +00:00
Carlos Martín Nieto
2ac57aa89b https: don't test that RC4 is invalid
None of our crypto backends actually reject RC4 as a cipher so don't
test for it and instead keep it as something we'd like to do.
2017-01-09 18:32:11 +00:00
Carlos Martín Nieto
3829ba2e71 http: correct the expected error for RC4
We must make sure that we're getting a certificate error from the
library so we know that we're testing the right thing.
2017-01-09 17:58:58 +00:00
Force.Charlie-I
3fdba15c2f fix examples/network/clone.c: heap-buffer-overflow
Format of a length of string to the correct format is:%.*s
2017-01-09 14:09:57 +08:00
Edward Thomson
a5cf255b47 Bump version to 0.25.1 2017-01-06 17:15:53 +00:00
Edward Thomson
6850b516b9 Merge branch '25_smartpktparse' into maint/v0.25 2017-01-06 17:12:16 +00:00
Patrick Steinhardt
2fdef641fd smart_pkt: treat empty packet lines as error
The Git protocol does not specify what should happen in the case
of an empty packet line (that is a packet line "0004"). We
currently indicate success, but do not return a packet in the
case where we hit an empty line. The smart protocol was not
prepared to handle such packets in all cases, though, resulting
in a `NULL` pointer dereference.

Fix the issue by returning an error instead. As such kind of
packets is not even specified by upstream, this is the right
thing to do.
2017-01-06 17:11:58 +00:00
Patrick Steinhardt
66e3774d27 smart_pkt: verify packet length exceeds PKT_LEN_SIZE
Each packet line in the Git protocol is prefixed by a four-byte
length of how much data will follow, which we parse in
`git_pkt_parse_line`. The transmitted length can either be equal
to zero in case of a flush packet or has to be at least of length
four, as it also includes the encoded length itself. Not
checking this may result in a buffer overflow as we directly pass
the length to functions which accept a `size_t` length as
parameter.

Fix the issue by verifying that non-flush packets have at least a
length of `PKT_LEN_SIZE`.
2017-01-06 17:11:44 +00:00
Edward Thomson
ab8a0fdb31 Merge branch '25_certcheckcb' into maint/v0.25 2017-01-06 17:10:49 +00:00
Carlos Martín Nieto
98d66240ec http: perform 'badssl' check also via certificate callback
Make sure that the callbacks do also get a 'valid' value of zero when
the certificate we're looking at is in valid and assert that within the
test.
2017-01-06 17:09:52 +00:00
Etienne Samson
9a64e62f0f http: check certificate validity before clobbering the error variable 2017-01-06 17:09:39 +00:00
Edward Thomson
5afd0f9b7b Merge pull request #4065 from simonbyrne/sb/changelog
Mention field addition in breaking API changes
2017-01-06 12:33:17 +00:00
lhchavez
96df833b63 Close the file before unlinking
I forgot that Windows chokes while trying to delete open files.
2017-01-03 19:15:09 -08:00
lhchavez
a7ff6e5e5e Fix the memory leak 2017-01-03 18:24:51 -08:00
Simon Byrne
d8f984bc49 move git_merge_options changes to correct location 2017-01-03 10:54:34 +00:00
Simon Byrne
31c7829954 mention field addition in breaking API changes 2017-01-03 10:11:52 +00:00
lhchavez
def644e48a Add a test 2017-01-01 17:35:29 -08:00
Edward Thomson
19ed4d0ca3 merge: set default rename threshold
When `GIT_MERGE_FIND_RENAMES` is set, provide a default for
`rename_threshold` when it is unset.
2017-01-01 22:34:43 +00:00
lhchavez
db535d0a7d Delete temporary packfile in indexer
This change deletes the temporary packfile that the indexer creates to
avoid littering the pack/ directory with garbage.
2017-01-01 12:46:37 -08:00
Edward Thomson
805b90aac4 Merge pull request #4015 from staticfloat/sf/win_http_parser
Allow Windows with WinHTTP to use external http-parser
2016-12-31 15:06:10 +00:00
Elliot Saba
e56e4c76b9 CMakeLists: Move http-parser block down by zlib, update error message 2016-12-30 17:59:47 -08:00
Edward Thomson
c9b9968905 Merge pull request #4052 from dglsswnsn/master
Fix issue #4046 Seg fault in config_files()
2016-12-30 19:14:02 +00:00
Edward Thomson
42ad85ef01 Merge pull request #4043 from fudanchii/fudanchii/openbsd
Fix BIO_* functions method linking when compiled with libressl (OpenBSD).
2016-12-30 16:35:24 +00:00
John Fultz
5f959dca0d Fix handling of GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH flag.
git_checkout_tree() sets up its working directory iterator to respect the
pathlist if GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH is present, which is great.
What's not so great is that this iterator is then used side-by-side with
an iterator created by git_checkout_iterator(), which did not set up its
pathlist appropriately (although the iterator mirrors all other iterator
options).

This could cause git_checkout_tree() to delete working tree files which
were not specified in the pathlist when GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH
was used, as the unsynchronized iterators causes git_checkout_tree() to think
that files have been deleted between the two trees.  Oops.

And added a test which fails without this fix (specifically, the final check
for "testrepo/README" to still be present fails).
2016-12-29 20:13:03 -06:00
Chris Hescock
c7a1535f32 Extend packfile in increments of page_size.
This improves performance by reducing the number of I/O operations.
2016-12-29 15:48:31 -05:00
Douglas Swanson
832278bf36 Fix issue #4046 Seg fault in config_files() 2016-12-29 07:43:03 -07:00
Edward Thomson
8f0d5cdef9 tests: update error message checking 2016-12-29 12:55:49 +00:00
Edward Thomson
909d549436 giterr_set: consistent error messages
Error messages should be sentence fragments, and therefore:

1. Should not begin with a capital letter,
2. Should not conclude with punctuation, and
3. Should not end a sentence and begin a new one
2016-12-29 12:26:03 +00:00
Edward Thomson
238b8ccd1a Merge pull request #4048 from jacquesg/rebase-error-check
rebase: check the result code of rebase_init_merge
2016-12-29 11:07:37 +00:00
Jacques Germishuys
f928c69a07 rebase: check the result code of rebase_init_merge 2016-12-29 12:54:26 +02:00
Edward Thomson
7829b4118a Merge pull request #4044 from jacquesg/mempack-version
mempack: set the odb backend version
2016-12-27 12:26:44 +00:00
Jacques Germishuys
6a8127d71d mempack: set the odb backend version 2016-12-25 22:13:48 +02:00
Nurahmadie
567b83de54 Fix BIO_* functions method linking when compiled with libressl.
ref:
672ac74ce7/media-video/ffmpeg/files/ffmpeg-3.2-libressl.patch
2016-12-24 17:43:08 +07:00
Carlos Martín Nieto
75db289a04 Merge pull request #3980 from tiennou/doc-fixes
Documentation fixes
2016-12-20 19:14:20 +00:00