summaryrefslogtreecommitdiff
path: root/git-submodule.sh
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-03-03 15:15:03 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-03-03 15:15:03 +0900
commit614a0a207999f413206bf547e3c603ac015554b0 (patch)
tree3fd19c10cd668b7e8d10a2ba3acf3ee42d5078ab /git-submodule.sh
parentc4b6a289fe358abffd0b1ce1897b9fcc08a74271 (diff)
downloadgit-614a0a207999f413206bf547e3c603ac015554b0.tar.gz
git-614a0a207999f413206bf547e3c603ac015554b0.tar.bz2
git-614a0a207999f413206bf547e3c603ac015554b0.zip
Imported Upstream version 2.3.10upstream/2.3.10
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-xgit-submodule.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index 36797c3c..78c2740f 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -22,6 +22,15 @@ require_work_tree
wt_prefix=$(git rev-parse --show-prefix)
cd_to_toplevel
+# Restrict ourselves to a vanilla subset of protocols; the URLs
+# we get are under control of a remote repository, and we do not
+# want them kicking off arbitrary git-remote-* programs.
+#
+# If the user has already specified a set of allowed protocols,
+# we assume they know what they're doing and use that instead.
+: ${GIT_ALLOW_PROTOCOL=file:git:http:https:ssh}
+export GIT_ALLOW_PROTOCOL
+
command=
branch=
force=