Commit Graph

10111 Commits

Author SHA1 Message Date
Russell Sim
0b9cba41f5 Imported Upstream version 0.25.1
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJY/an5AAoJECKxCSrd3Efdh/MQALKI7SwNcRF6CtloZ8YlndHu
 JLNNfFoLsy4WtaHiikEeQqLGct3jcrEw6SbVSJt1GncaKPbYy2SKFEl9eKfqJ0zv
 IQmF3O1JESm+SawmNJqeHLWBeL3rbL4BomDfPA/9h6hUE0Jh/13nuqZKSS8bdiMv
 uIAfEgZSU0cvAaN7hEwiEsDWQ1bQqQ3mcPUF4hAK86e2E8J6LS5/VFdc6t/n9vlq
 827ec5umFRMSyjQa+MGDe5/slvD9ytKsCq/HJ2vSiIy9OTNLaOYsWYz45bsd6Oeu
 S5Y5k9WocShP0N7YId1/uWQUJhaPlk+Bf2MzXhtoepf8FgUxTFbPKexzYA/EXkiX
 nLLwo//8DyIfshRv9aQARfEScL3DpX1k5z5gIQbjZVXYWEOZx2lPE9rgZzjfpLaP
 dySXEEGJoJSL+EhD4gVf7a0hchWBVSBvXfrgGuXWK1tbFJLsr90LqCB9bRnn51i1
 n3dhIlaiVqLRFnGTJF/iRRahazgXDHxIHRnW5ALpIpkn/+Mpv/+4J5fyFpCw5Noe
 nN8PE10TAYHIkaYtQjHkkVE+bFNmXbtVP56HGgoWrmGNTySb7xZKCOMhtDI0Fp3f
 JFw8fuQjAeGcNUDVZicqxe4mPQPrFrTCZAY1FoLkJvP7EBuOV5SAkr/5sswIrP5B
 qJlgbMOV2aA2NELHGyhs
 =QuCY
 -----END PGP SIGNATURE-----

Merge tag 'upstream/0.25.1'

Imported Upstream version 0.25.1
2017-04-24 09:43:52 +02:00
Russell Sim
9c87194ea8 Imported Upstream version 0.25.1 2017-04-24 09:29:42 +02: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
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
Russell Sim
bee5833420 Updated version 2017-01-02 21:30:39 +11:00
Russell Sim
7d17fa9861 Imported Upstream version 0.24.5
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEqR4jDDCme6EynCdoIrEJKt3cR90FAlhqHWUACgkQIrEJKt3c
 R93h5Q/7BDw9SQ9+1AT/wGEopsPwG9V4KewvNPGqoGTZBHWpuLv4iYZtlDTxBBJC
 H7inqmo15gqLT+W4XwEzQI5UJMvqhq8D9XzMYesL7ng1KLgzsIdNsiVzdFRbjOMv
 IPIaLOrXiFlmeaEDISdk6W5g9vHBJLiCGyQd2sr3KPoGz6M3ko+o+gGclo5rW/GZ
 78ZoJsn7Z6iHZSS/c0+KKv4RhaDQ3xdhDspgJSqWlDeofJl4EPAoX/RN9hxDpbGK
 Uhc98Vo816vYABrHwtB73gHoGx2gxuSP+Ecwrn13V1Z41yKyBcrI04Mj4h1OI3Qx
 0Cr+GRYgFg+y1mgpCpuI1foG72csCLLIAQhOiAn+G7jddxIfIzDrinlo9W4QA/So
 BoWYfaTG3UeSVXl6OyKeGrbjia/GTrqIts3UGDgOrqOzei9oYPe7LwzJAshsm31g
 zTSJi0NfPvYmpbupl+Zpm8m+TKC9K2BSBGf4NhjcKhqHJg0mst+756AL3aqTdbNo
 8+zU/jXDqxd1OxMnU5vhojlc1xudUrgcW2s1ZQ/KrTJtF86L95nYXWm6tEPnCj4+
 Vw8WxgwGwxzHQlqtU7OiqsBQoxQUg0Mp8S/E67RIvPqiGa+W3u3xT/dCaq6ov8on
 x7hx22FwUOGKfkG7Sf/hjFjq+k5qEnAzw6X0n6+/Zn43pP/+BNs=
 =i0+v
 -----END PGP SIGNATURE-----

Merge tag 'upstream/0.24.5'
2017-01-02 20:33:51 +11:00
Russell Sim
8f98253ddd Imported Upstream version 0.24.5 2017-01-02 20:25:02 +11:00
Carlos Martín Nieto
75db289a04 Merge pull request #3980 from tiennou/doc-fixes
Documentation fixes
2016-12-20 19:14:20 +00:00
Edward Thomson
42864e5842 Merge pull request #4041 from libgit2/cmn/bump-pretend-git
http: bump the pretend git version in the User-Agent
2016-12-20 17:17:12 +00:00
Carlos Martín Nieto
fafafb1f37 http: bump the pretend git version in the User-Agent
We want to keep the git UA in order for services to recognise that we're
a Git client and not a browser. But in order to stop dumb HTTP some
services have blocked UAs that claim to be pre-1.6.6 git.

Thread these needles by using the "git/2.0" prefix which is still close
enough to git's yet distinct enough that you can tell it's us.
2016-12-20 16:19:30 +00:00
Edward Thomson
8d7717c471 Merge pull request #4034 from libgit2/cmn/sysdir-no-reguess
sysdir: don't re-guess when using variable substitution
2016-12-20 15:32:49 +00:00
Edward Thomson
f91f170f0e Merge pull request #4032 from libgit2/cmn/https-cap-no-hardcode
Don't hard-code HTTPS cap & clarify the meanings of the features enum
2016-12-20 15:28:46 +00:00
Carlos Martín Nieto
329ce0439b Merge pull request #4037 from libgit2/cmn/goals
README: be more explicit in the goals and scope
2016-12-20 12:14:22 +00:00
Carlos Martín Nieto
b0b850bfca Merge pull request #4038 from lucasderraugh/patch-1
Gift deprecated in favor of SwiftGit2
2016-12-19 18:04:20 +00:00
Carlos Martín Nieto
3714c13a88 Merge pull request #4026 from libgit2/cmn/refdb-fs-errors
refdb: bubble up recursive rm when locking a ref
2016-12-19 17:28:41 +00:00
Carlos Martín Nieto
903955f7e5 Merge pull request #4027 from pks-t/pks/pack-deref-cache-on-error
pack: dereference cached pack entry on error
2016-12-19 17:26:09 +00:00
Lucas Derraugh
87faeaecda Gift deprecated in favor of SwiftGit2 2016-12-19 09:09:34 -08:00
Carlos Martín Nieto
349016790c Merge pull request #4033 from andhe/master
Fix off-by-one problems in git_signature__parse
2016-12-19 16:25:01 +00:00
Carlos Martín Nieto
8f064000dd README: be more explicit in the goals and scope
Make it clearer from the get-go that we do not aim to implement
user-facing commands from the git tool.
2016-12-19 13:54:55 +00:00
Carlos Martín Nieto
9f09f290bb sysdir: don't guess the paths again when $PATH is specified
We should replace it with whatever the user set, not start again.
2016-12-18 14:47:27 +00:00
Carlos Martín Nieto
410855fc4b sysdir: add failing test for variable substitution
When given $PATH as part of a search path, we guess again instead of
substituting what the user already set.
2016-12-18 14:47:27 +00:00
Andreas Henriksson
23c9ff8632 Fix off-by-one problems in git_signature__parse
Etc/GMT-14 aka UTC+14:00 is a thing....
https://en.wikipedia.org/wiki/UTC%2B14:00

Also allow offsets on the last minute (59).

Addresses: https://bugs.debian.org/841532
Fixes: #3970
2016-12-17 17:40:49 +01:00
Carlos Martín Nieto
77e4623257 settings: clarify what each value means
Most importantly, clarify what it means for HTTPS and SSH to be supported.
2016-12-17 14:31:36 +00:00
Carlos Martín Nieto
061a0ad1f9 settings: don't hard-code HTTPS capability
This partially reverts bdec62dce1 which activates
the transport code-paths which allow you to use a custom TLS implementation
without having to have one at build-time.

However the capabilities describe how libgit2 was built, not what it could
potentially support, bring back the ifdefs so we only say we support HTTPS if
libgit2 was itself built with a TLS implementation.
2016-12-17 14:23:35 +00:00
Carlos Martín Nieto
428e18f8d4 Bump version to 0.24.5 2016-12-17 10:47:29 +00:00
Carlos Martín Nieto
c655def117 Merge pull request #4031 from libgit2/cmn/plug-test-leak
rebase: plug a leak in the tests
2016-12-17 01:12:49 +00:00
Carlos Martín Nieto
f7dcd58cc7 rebase: plug a leak in the tests 2016-12-17 00:55:06 +00:00
Carlos Martín Nieto
302aff9695 Bump version to 0.24.4 2016-12-16 23:55:06 +00:00
Carlos Martín Nieto
14d11f5a07 Merge pull request #4012 from libgit2/cmn/openssl-maint
Add support for OpenSSL 1.1.0 for BIO filter
2016-12-16 23:52:12 +00:00
Carlos Martín Nieto
6ab65b80b4 refdb: bubble up recursive rm when locking a ref
Failure to bubble up this error means some locking errors do not get reported as
such on Windows.
2016-12-16 11:33:54 +00:00
Edward Thomson
c5e6ba2892 Merge pull request #4029 from libgit2/cmn/windows-no-concurrent-compress
refdb: disable concurrent compress in the threading tests on Windows
2016-12-15 18:19:49 -06:00
Carlos Martín Nieto
9d5f12ffd7 Merge pull request #4018 from pks-t/pks/various-fixes
Various fixes
2016-12-12 22:43:11 +00:00
Carlos Martín Nieto
b31283a658 refdb: disable concurrent compress in the threading tests on Windows
This is far from an ideal situation, but this causes issues on Windows which
make it harder to develop anything, as these tests hit issues which relate
specifically to the Windows filesystem like permission errors for files we
should be able to access. There is an issue likely related to the ordering of
the repack, but there's enough noise that it does not currently help us to run
this aspect of the test in CI.
2016-12-12 17:09:12 +00:00
Patrick Steinhardt
ff5eea06a9 pack: dereference cached pack entry on error
When trying to uncompress deltas in a packfile's delta chain, we try to
add object bases to the packfile cache, subsequently decrementing its
reference count if it has been added successfully. This may lead to a
mismatched reference count in the case where we exit the loop early due
to an encountered error.

Fix the issue by decrementing the reference count in error cleanup.
2016-12-12 09:45:07 +01:00
Patrick Steinhardt
34b320535b Fix potential use of uninitialized values 2016-12-12 09:16:33 +01:00
Patrick Steinhardt
e781a0c52f graph: flag fields should be declared as unsigned 2016-12-12 09:16:33 +01:00
Patrick Steinhardt
482d17484e transports: smart: do not redeclare loop counters 2016-12-12 09:16:33 +01:00
Patrick Steinhardt
6cf575b1ad path: remove unused local variable 2016-12-12 09:16:33 +01:00
Patrick Steinhardt
013ecb4f2a revwalk: do not re-declare commit variable 2016-12-12 09:16:33 +01:00
Patrick Steinhardt
8468a44067 odb_mempack: mark zero-length array as GIT_FLEX_ARRAY 2016-12-12 09:16:33 +01:00
Patrick Steinhardt
ab0cc5a059 clar: mark cl_git_thread_check() as inline
The function `cl_git_thread_check()` is defined as static. As the
function is defined in a header file which is included by our
tests, this can result in warnings for every test file where
`cl_git_thread_check` is never used.

Fix the issue by marking it as inline instead.
2016-12-12 09:16:33 +01:00
Edward Thomson
8339c66068 Merge pull request #4020 from novalis/rebase-detached
git_rebase_init: correctly handle detached HEAD
2016-12-07 17:44:25 +00:00