forked from msys2/MSYS2-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixes msys2#735 * Import *sh completion and XSS patches from openSUSE
- Loading branch information
Showing
9 changed files
with
384 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
contrib/completion/git-completion.bash | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
--- a/contrib/completion/git-completion.bash | ||
+++ b/contrib/completion/git-completion.bash | ||
@@ -536,7 +536,7 @@ __git_commands () { | ||
then | ||
printf "%s" "${GIT_TESTING_COMMAND_COMPLETION}" | ||
else | ||
- git help -a|egrep '^ [a-zA-Z0-9]' | ||
+ git help -a|egrep --color=never '^ [a-zA-Z0-9]' | ||
fi | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
From: Jakub Narebski <jnareb@...il.com> | ||
Subject: [PATCH] gitweb: Enable $prevent_xss by default | ||
|
||
This fixes issue CVE-2011-2186 originally reported in | ||
https://launchpad.net/bugs/777804 | ||
|
||
Reported-by: dave b <db.pub.mail@...il.com> | ||
Signed-off-by: Jakub Narebski <jnareb@...il.com> | ||
--- | ||
git-instaweb.sh | 4 ++++ | ||
gitweb/README | 5 +++-- | ||
gitweb/gitweb.perl | 2 +- | ||
3 files changed, 8 insertions(+), 3 deletions(-) | ||
|
||
--- a/git-instaweb.sh | ||
+++ b/git-instaweb.sh | ||
@@ -583,6 +583,10 @@ | ||
our \$git_temp = "$fqgitdir/gitweb/tmp"; | ||
our \$projects_list = \$projectroot; | ||
|
||
+# we can trust our own repository, so disable XSS prevention | ||
+# to enable some extra features | ||
+our \$prevent_xss = 0; | ||
+ | ||
\$feature{'remote_heads'}{'default'} = [1]; | ||
EOF | ||
} | ||
--- a/gitweb/gitweb.perl | ||
+++ b/gitweb/gitweb.perl | ||
@@ -170,7 +170,7 @@ | ||
|
||
# Disables features that would allow repository owners to inject script into | ||
# the gitweb domain. | ||
-our $prevent_xss = 0; | ||
+our $prevent_xss = 1; | ||
|
||
# Path to the highlight executable to use (must be the one from | ||
# http://www.andre-simon.de due to assumptions about parameters and output). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Index: git-2.10.0/git-sh-setup.sh | ||
=================================================================== | ||
--- git-2.10.0.orig/git-sh-setup.sh 2016-09-03 03:59:09.000000000 +0200 | ||
+++ git-2.10.0/git-sh-setup.sh 2016-09-07 17:24:58.817642893 +0200 | ||
@@ -3,7 +3,7 @@ | ||
# a few helper shell functions. | ||
|
||
# Source git-sh-i18n for gettext support. | ||
-. git-sh-i18n | ||
+. "$(git --exec-path)/git-sh-i18n" | ||
|
||
# Having this variable in your environment would break scripts because | ||
# you would cause "cd" to be taken to unexpected places. If you |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
ALL_LIBFILES uses wildcard, which provides the result in directory | ||
order. This order depends on the underlying filesystem on the | ||
buildhost. To get reproducible builds it is required to sort such list | ||
before using them. | ||
--- | ||
git-gui/Makefile | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
--- a/git-gui/Makefile | ||
+++ b/git-gui/Makefile | ||
@@ -259,7 +259,7 @@ lib/tclIndex: $(ALL_LIBFILES) GIT-GUI-VA | ||
rm -f $@ ; \ | ||
echo '# Autogenerated by git-gui Makefile' >$@ && \ | ||
echo >>$@ && \ | ||
- $(foreach p,$(PRELOAD_FILES) $(ALL_LIBFILES),echo '$(subst lib/,,$p)' >>$@ &&) \ | ||
+ $(foreach p,$(PRELOAD_FILES) $(sort $(ALL_LIBFILES)),echo '$(subst lib/,,$p)' >>$@ &&) \ | ||
echo >>$@ ; \ | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
contrib/completion/git-completion.tcsh | 17 +++++++---------- | ||
contrib/completion/git.csh | 4 ++++ | ||
contrib/completion/git.tcsh | 4 ++++ | ||
3 files changed, 15 insertions(+), 10 deletions(-) | ||
|
||
Index: git-2.4.6/contrib/completion/git-completion.tcsh | ||
=================================================================== | ||
--- git-2.4.6.orig/contrib/completion/git-completion.tcsh | ||
+++ git-2.4.6/contrib/completion/git-completion.tcsh | ||
@@ -32,14 +32,14 @@ if ( ${__git_tcsh_completion_version[1]} | ||
endif | ||
unset __git_tcsh_completion_version | ||
|
||
-set __git_tcsh_completion_original_script = ${HOME}/.git-completion.bash | ||
-set __git_tcsh_completion_script = ${HOME}/.git-completion.tcsh.bash | ||
+set __git_tcsh_completion_original_script = /etc/bash_completion.d/git.sh | ||
+set __git_tcsh_completion_script = $RPM_BUILD_ROOT/usr/share/tcsh/git.complete | ||
|
||
-# Check that the user put the script in the right place | ||
-if ( ! -e ${__git_tcsh_completion_original_script} ) then | ||
- echo "git-completion.tcsh: Cannot find: ${__git_tcsh_completion_original_script}. Git completion will not work." | ||
- exit | ||
-endif | ||
+# # Check that the user put the script in the right place | ||
+# if ( ! -e ${__git_tcsh_completion_original_script} ) then | ||
+# echo "git-completion.tcsh: Cannot find: ${__git_tcsh_completion_original_script}. Git completion will not work." | ||
+# exit | ||
+# endif | ||
|
||
cat << EOF >! ${__git_tcsh_completion_script} | ||
#!bash | ||
@@ -121,6 +121,3 @@ EOF | ||
|
||
# Don't need this variable anymore, so don't pollute the users environment | ||
unset __git_tcsh_completion_original_script | ||
- | ||
-complete git 'p,*,`bash ${__git_tcsh_completion_script} git "${COMMAND_LINE}"`,' | ||
-complete gitk 'p,*,`bash ${__git_tcsh_completion_script} gitk "${COMMAND_LINE}"`,' | ||
Index: git-2.4.6/contrib/completion/git.csh | ||
=================================================================== | ||
--- /dev/null | ||
+++ git-2.4.6/contrib/completion/git.csh | ||
@@ -0,0 +1,4 @@ | ||
+if (${?prompt}) then | ||
+complete git 'p,*,`bash /usr/share/tcsh/git.complete git "${COMMAND_LINE}"`,' | ||
+complete gitk 'p,*,`bash /usr/share/tcsh/git.complete gitk "${COMMAND_LINE}"`,' | ||
+endif | ||
Index: git-2.4.6/contrib/completion/git.tcsh | ||
=================================================================== | ||
--- /dev/null | ||
+++ git-2.4.6/contrib/completion/git.tcsh | ||
@@ -0,0 +1,4 @@ | ||
+if (${?prompt}) then | ||
+complete git 'p,*,`bash /usr/share/tcsh/git.complete git "${COMMAND_LINE}"`,' | ||
+complete gitk 'p,*,`bash /usr/share/tcsh/git.complete gitk "${COMMAND_LINE}"`,' | ||
+endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
contrib/completion/git-completion.zsh | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
--- a/contrib/completion/git-completion.zsh | ||
+++ b/contrib/completion/git-completion.zsh | ||
@@ -31,6 +31,7 @@ if [ -z "$script" ]; then | ||
local e | ||
locations=( | ||
$(dirname ${funcsourcetrace[1]%:*})/git-completion.bash | ||
+ '/etc/bash_completion.d/git.sh' # suse | ||
'/etc/bash_completion.d/git' # fedora, old debian | ||
'/usr/share/bash-completion/completions/git' # arch, ubuntu, new debian | ||
'/usr/share/bash-completion/git' # gentoo |
Oops, something went wrong.