Mercurial > public > mercurial-scm > hg-stable
diff tests/test-subrepo-git.t @ 34962:071cbeba4212 stable
subrepo: disallow symlink traversal across subrepo mount point (SEC)
It wasn't easy to extend the pathauditor to check symlink traversal across
subrepos because pathauditor._checkfs() rejects a directory having ".hg"
directory. That's why I added the explicit islink() check.
No idea if this patch is necessary after we've fixed the issue5730 by
splitting submerge() into planning and execution phases.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Fri, 03 Nov 2017 20:12:50 +0900 |
parents | eb586ed5d8ce |
children | 5e27afeddaee |
line wrap: on
line diff
--- a/tests/test-subrepo-git.t Fri Nov 03 19:17:25 2017 +0900 +++ b/tests/test-subrepo-git.t Fri Nov 03 20:12:50 2017 +0900 @@ -400,11 +400,13 @@ Don't crash if subrepo is a broken symlink $ ln -s broken s $ hg status -S + abort: subrepo 's' traverses symbolic link + [255] $ hg push -q - abort: subrepo s is missing (in subrepository "s") + abort: subrepo 's' traverses symbolic link [255] $ hg commit --subrepos -qm missing - abort: subrepo s is missing (in subrepository "s") + abort: subrepo 's' traverses symbolic link [255] $ rm s #endif