Просмотр исходного кода

remove .git/gitweb

I don't think this is a security issue, but it has no business being
distributed in debian source packages.
Joey Hess лет назад: 19
Родитель
Сommit
f973b85582
1 измененных файлов с 10 добавлено и 0 удалено
  1. 10 0
      scripts/Dpkg/Source/VCS/git.pm

+ 10 - 0
scripts/Dpkg/Source/VCS/git.pm

@@ -168,6 +168,11 @@ sub prep_tar {
 	$? && main::subprocerr("rm -rf .git/logs");
 	system("git-gc", "--prune");
 	$? && main::subprocerr("git-gc --prune");
+	
+	# .git/gitweb is created and used by git-instaweb and should not be
+	# transferwed by source package.
+	system("rm", "-rf", ".git/gitweb");
+	$? && main::subprocerr("rm -rf .git/gitweb");
 
 	# As an optimisation, remove the index. It will be recreated by git
 	# reset during unpack. It's probably small, but you never know, this
@@ -243,6 +248,11 @@ sub post_unpack_tar {
 		close GIT_CONFIG;
 	}
 
+	# .git/gitweb is created and used by git-instaweb and should not be
+	# transferwed by source package.
+	system("rm", "-rf", ".git/gitweb");
+	$? && main::subprocerr("rm -rf .git/gitweb");
+
 	# git-checkout is used to repopulate the WC with files
 	# and recreate the index.
 	system("git-checkout", "-f");