Release v0.26.4 - #4666
Merged
Merged
Conversation
At present, we have three online tests against bitbucket: one which specifies the credentials in the payload, one which specifies the correct credentials in the URL and a final one that specifies the incorrect credentials in the URL. Bitbucket has begun responding to the latter test with a 403, which causes us to fail. Break these three tests into separate tests so that we can skip the latter until this is resolved on Bitbucket's end or until we can change the test to a different provider.
Update the settings to use a specific read-only token for accessing our test repositories in Bitbucket.
We should pretend such submdules do not exist as it can lead to RCE.
If the we decide that the "name" of the submodule (i.e. its path inside `.git/modules/`) is trying to escape that directory or otherwise trick us, we ignore the configuration for that submodule. This leaves us with a half-configured submodule when looking it up by path, but it's the same result as if the configuration really were missing. The name check is potentially more strict than it needs to be, but it lets us re-use the check we're doing for the checkout. The function that encapsulates this logic is ready to be exported but we don't want to do that in a security release so it remains internal for now.
Otherwise we would also admit `..\..\foo\bar` as a valid path and fail to protect Windows users. Ideally we would check for both separators without the need for the copied string, but this'll get us over the RCE.
This lets us check for other kinds of reserved files.
It checks against the 8.3 shortname variants, including the one which includes the checksum as part of its name.
Given a path component it knows what to pass to the filesystem-specific functions so we're protected even from trees which try to use the 8.3 naming rules to get around us matching on the filename exactly. The logic and test strings come from the equivalent git change.
These can't go into the public API yet as we don't want to introduce API or ABI changes in a security release.
These will be used by the checkout code to detect them for the particular filesystem they're on.
We want to reject these as they cause compatibility issues and can lead to git writing to files outside of the repository.
We may take in names from the middle of a string so we want the caller to let us know how long the path component is that we should be checking.
This is so we have it available for the path validity checking. In a later commit we will start rejecting `.gitmodules` files as symlinks.
Any part of the library which asks the question can pass in the mode to have it checked against `.gitmodules` being a symlink. This is particularly relevant for adding entries to the index from the worktree and for checking out files.
When dealing with `core.proectNTFS` and `core.protectHFS` we do check against `.gitmodules` but we still have a failing test as the non-filesystem codepath does not check for it.
We still compare case-insensitively to protect more thoroughly as we don't know what specifics we'll see on the system and it's the behaviour from git.
We might modify caches due to us trying to load the configuration to figure out what kinds of filesystem protections we should have.
Member
Author
Member
|
Your last two commit messages reference 0.27 still (though they correctly update the version number in the product). Otherwise I'm 👍 |
Member
Author
|
Oh, forgot to adjust the commit messages. Thanks for noticing. |
Member
|
@pks-t do you want to do the honors of tagging, or should I? |
Member
Author
|
I went ahead and tagget the release, thanks for merging. I would've done it a bit earlier, but I got a nice case of summer flu and today my ISP decided to turn off my internet access. Fun times :) Please just have a quick look and verify whether the release looks good. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of v0.27.1 to maint/0.26. This is mainly intended as a help for objective-git, which is currently stalled due to libssh2 linking issues, but it might be useful to others, as well.