|
2e4ea7b7
|
2022-07-02T10:19:33
|
|
repo: validate gitdir and gitlink ownership
To match git's behavior with CVE 2022-29187, validate not only the
working directory, but also the gitdir and gitlink (if it exists). This
a follow up to CVE-2022-24765 that was fixed earlier.
|
|
9e35f96e
|
2022-07-04T16:03:10
|
|
repo: allow admin owned configs by admin users
Allow users in the administrator group to use git configs that are owned
by administrators.
|
|
decffcf2
|
2022-07-07T00:02:19
|
|
fs: allow ownership match if user is in admin group
Allow the user ownership to match if the file is owned by the admin
group and the user is in the admin group, even if the current process is
not running as administrator directly.
|
|
be29b861
|
2022-07-04T15:20:59
|
|
fs: refactor file ownership checks
Refactor the file ownership checks so that callers can provide discrete
information about the ownership expectations to a single function.
|
|
35905738
|
2022-07-03T09:07:32
|
|
fs: remove mock naming from change ownership constants
The file ownership concepts can reflect the actual file ownership, they
are not necessarily limited to mocking the interface. Rename them so
that they can be more broadly applicable.
|
|
77f95ffa
|
2022-07-02T15:21:55
|
|
repo: add tests for bare repo permissions
Ensure that we test opening a bare repository with odd permissions.
|
|
88717a36
|
2022-07-06T11:45:08
|
|
ci: update dockerfiles for mbedTLS new url
Update the new URL for mbedTLS.
|
|
24d1238f
|
2022-07-06T13:10:29
|
|
actions: pass UID and GID to PR builds of dockerfiles
|
|
009fd547
|
2022-07-06T11:28:46
|
|
ci: updates for CI
|
|
3ace5992
|
2022-05-09T12:09:08
|
|
revparse: Remove error-prone, redundant test
Originally introduced in: 776a6a8e5f8e258d31aded73c0ce38df6ac7bdc4
This test case has recently been fixed in bdab22384cc61d315005a65456a9f9563bb27c8f, but that fix will only last for a year. Next year the same problem will crop up and the test will need to be re-edited.
This is not ideal as
- This test case becomes an unnecessary burden for developers
- Downstream distros or even just users who want to build older versions of libgit2 are guaranteed to have this test fail
Furthermore, this test case is entirely unnecessary, as the functionality that was originally (see 776a6a8e5f8e258d31aded73c0ce38df6ac7bdc4) intended to be tested is well-covered by subsequent tests which specify a date instead of a "x ago" specification.
|
|
1f5e7f9a
|
2022-04-12T16:17:18
|
|
Merge pull request #6271 from libgit2/ethomson/v1.3.1
v1.3.1 release
|
|
23c24f80
|
2022-04-12T15:54:26
|
|
meta: changelog for v1.3.1
|
|
1f39aacc
|
2022-04-12T15:52:47
|
|
meta: update version numbers for v1.3.1
|
|
a9eac6a6
|
2022-04-12T14:21:42
|
|
Merge pull request #6268 from libgit2/ethomson/ownership_13
Validate repository directory ownership (v1.3)
|
|
eb8c3e5d
|
2022-04-11T15:18:44
|
|
repo: honor safe.directory during ownership checks
Obey the `safe.directory` configuration variable if it is set in the
global or system configuration. (Do not try to load this from the
repository configuration - to avoid malicious repositories that then
mark themselves as safe.)
|
|
f6838066
|
2022-04-11T13:04:26
|
|
repo: refactor global config loader function
Pull the global configuration loader out of the symlink check so that it
can be re-used.
|
|
caee92ee
|
2022-04-11T17:07:20
|
|
repo: test configuration ownership validation
Test that we prevent opening directories that are not owned by
ourselves.
|
|
e4eabb03
|
2022-04-11T23:47:01
|
|
fs_path: mock ownership checks
Provide a mock for file ownership for testability.
|
|
62d492de
|
2022-04-11T09:56:26
|
|
repo: ensure that repo dir is owned by current user
Ensure that the repository directory is owned by the current user; this
prevents us from opening configuration files that may have been created
by an attacker.
|
|
973d959a
|
2022-04-10T21:29:43
|
|
path: refactor ownership checks into current user and system
Provide individual file ownership checks for both the current user and
the system user, as well as a combined current user and system user
check.
|
|
670415a5
|
2022-03-22T23:05:48
|
|
clone: update bitbucket tests
|
|
6b127626
|
2022-01-10T21:25:05
|
|
online: test with https instead of git protocol
GitHub is removing support for the unauthenticated git protocol; test
with the https protocol.
|
|
b58e9053
|
2022-04-11T21:31:25
|
|
repo: make ownership checks optional
Introduce the `GIT_OPT_SET_OWNER_VALIDATION` option, so that users can
disable repository ownership validation.
|
|
37caa8dc
|
2022-02-26T12:56:43
|
|
meta: show build status for v1.3 branch
|
|
b7bad55e
|
2021-09-27T16:09:50
|
|
v1.3: very very last-minute changelog updates
|
|
424812e3
|
2021-09-27T11:23:44
|
|
Merge pull request #6071 from 257/examples
examples: Free the git_config and git_config_entry after use
|
|
13f1270a
|
2021-09-27T08:58:28
|
|
v1.3: changelog updates for last-minute changes
|
|
8c29885e
|
2021-09-27T08:57:03
|
|
Merge pull request #6076 from libgit2/ethomson/oidarray_dispose
oidarray: introduce `git_oidarray_dispose`
|
|
b6449de3
|
2021-09-27T08:39:55
|
|
Merge pull request #6075 from libgit2/ethomson/attr_longpaths
|
|
853ba203
|
2021-09-27T08:39:39
|
|
Merge pull request #6073 from libgit2/ethomson/attr_lookups
|
|
a6f6a9f4
|
2021-09-26T22:09:37
|
|
Merge pull request #6077 from libgit2/ethomson/strarray
buf: common_prefix takes a string array
|
|
7e7cfe8a
|
2021-09-26T20:20:03
|
|
buf: common_prefix takes a string array
`git_strarray` is a public-facing type. Change
`git_buf_text_common_prefix` to not use it, and just take an array of
strings instead.
|
|
0bd132ab
|
2021-09-26T17:58:08
|
|
oidarray: introduce `git_oidarray_dispose`
Since users are disposing the _contents_ of the oidarray, not freeing
the oidarray itself, the proper cleanup function is
`git_oidarray_dispose`. Deprecate `git_oidarray_free`.
|
|
46508fe6
|
2021-09-26T11:28:47
|
|
attr_file: don't take the `repo` as an arg
The `repo` argument is now unnecessary. Remove it.
|
|
f5a9f0a2
|
2021-09-25T15:19:22
|
|
attr_file: don't validate workdir paths in attr lookups
When looking up attributes for a file, we construct an absolute path
to the queried file within the working directory so that we can accept
both absolute paths and working directory relative paths. We then trim
the leading working directory path to give us an in-repo path.
Since we only want the in-repo path to look up attributes - and not to
read it from disk - we don't need to validate its length.
|
|
091bd738
|
2021-09-24T17:00:43
|
|
attr: ensure lookups are on repo-relative paths
Attribute lookups are done on paths relative to the repository. Fail if
erroneously presented with an absolute path.
|
|
3d8749d3
|
2021-09-24T16:07:17
|
|
checkout: always provide a path for attribute lookup
Always pass a working-directory relative path to attribute lookups
during checkout.
|
|
848bd009
|
2021-09-24T16:05:23
|
|
blob: improve `create_from_disk` attribute lookups
Resolve absolute paths to be working directory relative when looking up
attributes. Importantly, now we will _never_ pass an absolute path down
to attribute lookup functions.
|
|
0f4256b8
|
2021-09-24T15:23:34
|
|
repository: improve `hashfile` for absolute paths
When `git_repository_hashfile` is handed an absolute path, it determines
whether the path is within the repository's working directory or not.
This is necessary when there is no `as_path` specified.
If the path is within the working directory, then the given path should
be used for attribute lookups (it is the effective `as_path`). If it is
not within the working directory, then it is _not_ eligible.
Importantly, now we will _never_ pass an absolute path down to attribute
lookup functions.
|
|
d6c7ca3e
|
2021-09-25T14:36:25
|
|
win32: posixify the output of p_getcwd
Make p_getcwd match the rest of our win32 path handling semantics.
(This is currently only used in tests, which is why this disparity went
unnoticed.)
|
|
581cfbda
|
2021-09-23T11:59:52
|
|
examples: Free the git_config and git_config_entry after use
|
|
13690108
|
2021-09-22T15:31:21
|
|
changelog: separate releases with a horizontal rule
|
|
61bbb2d1
|
2021-09-22T15:28:23
|
|
changelog: fix typo
|
|
183da2cc
|
2021-09-22T15:25:53
|
|
Merge pull request #6069 from libgit2/ethomson/v1_3
v1.3.0
|
|
e7437162
|
2021-09-22T08:35:02
|
|
v1.3: update version number
|
|
e0531f2c
|
2021-09-22T08:34:10
|
|
v1.3: changelog
|
|
a5644b80
|
2021-09-22T08:48:17
|
|
Merge pull request #6068 from libgit2/ethomson/diff_enum
diff: update `GIT_DIFF_IGNORE_BLANK_LINES`
|
|
1ba7c327
|
2021-09-21T20:23:44
|
|
diff: update `GIT_DIFF_IGNORE_BLANK_LINES`
`GIT_DIFF_IGNORE_BLANK_LINES` needs to be within a (signed) int, per the
`enum` definition of ISO C.
|
|
efa0d64e
|
2021-09-21T13:19:10
|
|
Merge pull request #6067 from libgit2/ethomson/filter_commit_id
filter: use a `git_oid` in filter options, not a pointer
|
|
abd8142c
|
2021-09-21T12:27:37
|
|
Merge pull request #6064 from libgit2/ethomson/ci_libssh2
ci: pull libssh2 from www.libssh2.org
|
|
825dd544
|
2021-09-20T12:41:13
|
|
ci: pull libssh2 from www.libssh2.org
libssh2.org and www.libssh2.org were previously identical; now this is a
redirect.
|
|
5ea2966d
|
2021-09-21T11:52:05
|
|
Merge pull request #6066 from libgit2/ethomson/deprecation
Fixes for deprecated APIs
|
|
90656858
|
2021-09-21T11:28:39
|
|
filter: use a `git_oid` in filter options, not a pointer
Using a `git_oid *` in filter options was a mistake; it is a deviation
from our typical pattern, and callers in some languages that GC may need
very special treatment in order to pass both an options structure and a
pointer outside of it.
|
|
470acc71
|
2021-09-21T11:01:27
|
|
rebase: fix (deprecated) signing test
|
|
62eb2f83
|
2021-09-21T10:59:49
|
|
email: don't clear buffer in append function
`git_email__append_from_diff` is meant to - well, append from a diff.
Clearing the buffer, by definition, is not appending. Stop doing that.
|
|
ba01547d
|
2021-09-20T21:45:10
|
|
Merge pull request #6061 from libgit2/ethomson/email
Introduce `git_email_create`; deprecate `git_diff_format_email`
|
|
0a872862
|
2021-09-20T14:00:36
|
|
Merge pull request #6063 from libgit2/ethomson/win32_envvar
win32: allow empty environment variables
|
|
18fc751e
|
2021-09-20T13:07:37
|
|
win32: allow empty environment variables
A length of 0 indicates an error and GetLastError() will be set. If
GetLastError() is unset then the environment variable has a length of 0.
|
|
1396a9b5
|
2021-09-20T12:36:56
|
|
Merge pull request #6020 from lolgear/refactoring/stdint_ifdef_condition_has_been_reverted
Stdint header condition has been reverted.
|
|
bfdba8ee
|
2021-09-20T12:19:48
|
|
Merge branch 'sathieu/patch-1' into main
|
|
8e762124
|
2021-09-20T12:19:05
|
|
httpproxy: move empty string test above config
The configuration change will override the environment variable, so the
environment variable check needs to come first.
|
|
d60872f6
|
2021-09-20T14:09:37
|
|
Merge branch 'longpath_filter_bug' into main
|
|
005c740b
|
2021-09-20T14:06:09
|
|
win32: ensure content filtering occurs in longpath test
|
|
482e3853
|
2021-09-20T14:06:50
|
|
Merge remote-tracking branch 'mathworks/longpath_filter_bug' into main
|
|
0644c2e8
|
2021-09-20T08:39:46
|
|
Merge pull request #6058 from mathworks/proxy_config_with_detached_remote
Allow proxy options when connecting with a detached remote.
|
|
4f5653a4
|
2021-09-20T08:33:12
|
|
Merge pull request #6060 from ccstolley/ccs_merge_bugfix
merge: Check file mode when resolving renames
|
|
3bd462a1
|
2021-09-18T21:08:20
|
|
Update remote.c
Initialise cfg variable.
|
|
c8823fb0
|
2021-09-18T21:00:48
|
|
Apply suggestions from code review
Co-authored-by: Edward Thomson <ethomson@github.com>
|
|
3f36e796
|
2021-09-18T14:07:18
|
|
Merge pull request #6050 from shijinglu/patch-1
Update README.md
|
|
ba3595af
|
2021-09-13T16:25:00
|
|
diff: deprecate diff_format_email
`git_diff_format_email` is deprecated in favor of `git_email_create`.
|
|
67b1d019
|
2021-09-14T09:49:31
|
|
email: include renames by default
`git format-patch` includes diffs with rename detection enabled by
default when creating emails. Match this behavior.
|
|
323f222f
|
2021-09-14T09:44:52
|
|
email: include binary diffs by default
`git format-patch` includes binary diffs by default when creating
emails. Match this behavior.
|
|
c443495b
|
2021-09-13T13:29:46
|
|
diff: use `git_email_create` in `diff_format_email`
|
|
971ed753
|
2021-09-13T13:26:55
|
|
email: introduce 'append_from_diff'
Introduce `git_email__append_from_diff` so that we don't always
overwrite the input buffer.
|
|
f407d3fa
|
2021-09-13T10:51:42
|
|
diff_commit_as_email: use `email_create`
Move the `git_diff_commit_as_email` function to use `email_create`.
|
|
3f13d2e8
|
2021-09-13T10:36:48
|
|
email: allow `git_diff_commit_as_email` to take 0 as patch index
Allow a `0` patch index and `0` patch count; in this case, simply don't
display these in the email.
|
|
6aa34966
|
2021-09-13T08:17:21
|
|
email: introduce `git_email_create_from_diff`
Introduce a function to create an email from a diff and multiple inputs
about the source of the diff.
Creating an email from a diff requires many more inputs, and should be
discouraged in favor of building directly from a commit, and is thus in
the `sys` namespace.
|
|
75d4676a
|
2021-09-12T17:06:14
|
|
email: introduce `git_email_create_from_commit`
Create `git_email_*` which will encapsulate email creation and
application, and `git_email_create_from_commit` in particular, which
creates an email for a single commit.
|
|
e994299f
|
2021-09-16T11:53:32
|
|
Update formatting.
|
|
eb41276f
|
2021-09-16T11:44:04
|
|
Allow proxy options when connecting with a detached remote.
|
|
516f7519
|
2021-09-09T15:08:36
|
|
Add test for revert+rename bug.
|
|
479a38bf
|
2021-09-09T15:21:48
|
|
merge: Check file mode when resolving renames.
When determining if ours or theirs changed, we check the oids but not
their respective file modes. This can lead to merges introducing incorrect
file mode changes (eg., in a revert). A simple linear example might be:
commit A - introduces file `foo` with chmod 0755
commit B - updates some unrelated file
commit C - renames `foo` to `bar` and chmod 0644
If B is reverted, `bar` will unexpectedly acquire mode 0755.
|
|
7d195b9c
|
2021-09-14T09:53:15
|
|
Merge pull request #6053 from stac47/ssh2_discovery
Discover libssh2 without pkg-config
|
|
aa993f76
|
2021-09-13T11:40:38
|
|
buf: introduce `git_buf_truncate_at`
|
|
0d30e7bb
|
2021-09-14T13:07:33
|
|
Apply suggestions from code review
Co-authored-by: Edward Thomson <ethomson@github.com>
|
|
413bfb83
|
2021-09-14T13:53:29
|
|
Update src/CMakeLists.txt
Co-authored-by: Edward Thomson <ethomson@github.com>
|
|
646bae34
|
2021-09-14T07:47:19
|
|
Merge pull request #6041 from Esri/duncan/typeof
Use __typeof__ GNUC keyword for ISO C compatibility
|
|
b6735461
|
2021-09-14T07:46:49
|
|
Merge pull request #6039 from lhchavez/avoid-mmap-in-git-indexer-append
indexer: Avoid one `mmap(2)`/`munmap(2)` pair per `git_indexer_append` call
|
|
4f24a932
|
2021-09-14T07:45:50
|
|
Merge pull request #6031 from libgit2/ethomson/extensions
Support custom git extensions
|
|
5bd49aee
|
2021-09-14T07:44:37
|
|
Merge pull request #6045 from punkymaniac/qa-fix-coding-style-pointer
Fix coding style for pointer
|
|
1f6263b8
|
2021-09-14T07:43:35
|
|
Merge pull request #6043 from basile-henry/config-multiline-comment-chars
Fix config parsing for multiline with multiple quoted comment chars
|
|
baf001ed
|
2021-09-14T07:42:25
|
|
Merge pull request #6047 from libgit2/ethomson/notes_cleanup
notes: use a buffer internally
|
|
6cf9a0b3
|
2021-09-14T12:34:45
|
|
Refactor shared code in longpath test.
|
|
26bf94c0
|
2021-09-14T12:19:54
|
|
If longpaths is true and filters are enabled, pass git_repository through the filtering code to ensure the cached longpath setting is returned.
Fixes: #6054
|
|
0a3a220f
|
2021-09-14T09:53:24
|
|
Discover libssh2 without pkg-config
|
|
31e32ddf
|
2021-09-14T09:34:25
|
|
Add test to ensure empty proxy env behaves like unset env
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
|
|
dfbb25f1
|
2021-09-12T23:39:03
|
|
Update README.md
Add git24j to the language bindings
|
|
cd0fd0f5
|
2021-09-10T07:19:06
|
|
notes: use a buffer internally
Code cleanup to use `git_buf`s instead of simple c strings.
|
|
574c590f
|
2021-09-09T21:53:45
|
|
Fix multiline strip_comments logic
The strip_comments function uses the count of quotes to know if a
comment char (';' or '#') is the start of a comment or part of the
multiline as a string.
Unfortunately converting the count of quotes from previous lines to a
boolean meant that it would only work as expected in some cases
(0 quotes or an odd number of quotes).
|
|
5eab4daf
|
2021-09-09T21:51:52
|
|
Add test config parsing
This tests parsing a multiline string containing multiple quoted comment
chars. See #6019
|