aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/gitattributes.txt
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2021-02-28 12:22:47 +0100
committerJunio C Hamano <gitster@pobox.com>2021-03-11 13:22:44 -0800
commit96099726ddb00b45135964220ce56468ba9fe184 (patch)
tree67511a24e20bf148d232a8595719cb8bf48d4077 /Documentation/gitattributes.txt
parent273c9901c2ebfb2dae0c52de912bf3f57be19aac (diff)
downloadgit-96099726ddb00b45135964220ce56468ba9fe184.tar.gz
archive: expand only a single %(describe) per archive
Every %(describe) placeholder in $Format:...$ strings in files with the attribute export-subst is expanded by calling git describe. This can potentially result in a lot of such calls per archive. That's OK for local repositories under control of the user of git archive, but could be a problem for hosted repositories. Expand only a single %(describe) placeholder per archive for now to avoid denial-of-service attacks. We can make this limit configurable later if needed, but let's start out simple. Reported-by: Jeff King <peff@peff.net> Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/gitattributes.txt')
-rw-r--r--Documentation/gitattributes.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index e84e104f93..0a60472bb5 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -1174,7 +1174,8 @@ tag then no replacement will be done. The placeholders are the same
as those for the option `--pretty=format:` of linkgit:git-log[1],
except that they need to be wrapped like this: `$Format:PLACEHOLDERS$`
in the file. E.g. the string `$Format:%H$` will be replaced by the
-commit hash.
+commit hash. However, only one `%(describe)` placeholder is expanded
+per archive to avoid denial-of-service attacks.
Packing objects