##// END OF EJS Templates
convert: test for shell injection in git calls (SEC)...
convert: test for shell injection in git calls (SEC) CVE-2016-3069 (5/5) Before recent refactoring we were not escaping calls to git at all which made such injections possible. Let's have a test for that to avoid this problem in the future. Reported by Blake Burkhart.

File last commit:

r27591:127cc7f7 default
r28663:ae279d4a 3.7.3 stable
Show More
test-dirstate-nonnormalset.t
22 lines | 498 B | text/troff | Tads3Lexer
/ tests / test-dirstate-nonnormalset.t
$ cat >> $HGRCPATH << EOF
> [ui]
> logtemplate="{rev}:{node|short} ({phase}) [{tags} {bookmarks}] {desc|firstline}\n"
> [extensions]
> dirstateparanoidcheck = $TESTDIR/../contrib/dirstatenonnormalcheck.py
> [experimental]
> nonnormalparanoidcheck = True
> [devel]
> all-warnings=True
> EOF
$ mkcommit() {
> echo "$1" > "$1"
> hg add "$1"
> hg ci -m "add $1"
> }
$ hg init testrepo
$ cd testrepo
$ mkcommit a
$ mkcommit b
$ mkcommit c
$ hg status