Merge branch 'sg/archive-restrict-remote'
Allow loosening remote "git archive" invocation security check that refuses to serve tree-ish not at the tip of any ref. * sg/archive-restrict-remote: add uploadarchive.allowUnreachable option docs: clarify remote restrictions for git-upload-archive
This commit is contained in:
@ -213,6 +213,15 @@ test_expect_success 'clients cannot access unreachable commits' '
|
||||
test_must_fail git archive --remote=. $sha1 >remote.tar
|
||||
'
|
||||
|
||||
test_expect_success 'upload-archive can allow unreachable commits' '
|
||||
test_commit unreachable1 &&
|
||||
sha1=`git rev-parse HEAD` &&
|
||||
git reset --hard HEAD^ &&
|
||||
git archive $sha1 >remote.tar &&
|
||||
test_config uploadarchive.allowUnreachable true &&
|
||||
git archive --remote=. $sha1 >remote.tar
|
||||
'
|
||||
|
||||
test_expect_success 'setup tar filters' '
|
||||
git config tar.tar.foo.command "tr ab ba" &&
|
||||
git config tar.bar.command "tr ab ba" &&
|
||||
|
Reference in New Issue
Block a user