##// 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:

r27988:61f4d59e stable
r28663:ae279d4a 3.7.3 stable
Show More
failfilemerge.py
18 lines | 483 B | text/x-python | PythonLexer
# extension to emulate interupting filemerge._filemerge
from __future__ import absolute_import
from mercurial import (
filemerge,
extensions,
error,
)
def failfilemerge(filemergefn,
premerge, repo, mynode, orig, fcd, fco, fca, labels=None):
raise error.Abort("^C")
return filemergefn(premerge, repo, mynode, orig, fcd, fco, fca, labels)
def extsetup(ui):
extensions.wrapfunction(filemerge, '_filemerge',
failfilemerge)