]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Revert "Tell `git revert` not to follow renames (CVE-2016-10026)"
authorSimon McVittie <smcv@debian.org>
Mon, 26 Dec 2016 18:18:45 +0000 (18:18 +0000)
committerSimon McVittie <smcv@debian.org>
Wed, 11 Jan 2017 19:55:08 +0000 (19:55 +0000)
This doesn't work prior to git 2.8: `git revert` silently ignores the
option and succeeds. We will have to fix CVE-2016-10026 some other way.

This reverts commit bb5cf4a0940b8fd2750c6175adb15382b84c71e2.

IkiWiki/Plugin/git.pm

index 641e397eb1a41e06d303909e6b8437070df0e23f..75b89e476bbb4bf1da262385a8e390994489f0e9 100644 (file)
@@ -944,9 +944,7 @@ sub rcs_revert ($) {
        my $rev = shift;
        my ($sha1) = $rev =~ /^($sha1_pattern)$/; # untaint
 
        my $rev = shift;
        my ($sha1) = $rev =~ /^($sha1_pattern)$/; # untaint
 
-       if (run_or_non('git', 'revert', '--strategy=recursive',
-                       '--strategy-option=no-renames',
-                       '--no-commit', $sha1)) {
+       if (run_or_non('git', 'revert', '--no-commit', $sha1)) {
                return undef;
        }
        else {
                return undef;
        }
        else {