mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
273c9901c2
commit
96099726dd
@@ -5,6 +5,7 @@
|
||||
#include "pathspec.h"
|
||||
|
||||
struct repository;
|
||||
struct pretty_print_context;
|
||||
|
||||
struct archiver_args {
|
||||
struct repository *repo;
|
||||
@@ -22,6 +23,7 @@ struct archiver_args {
|
||||
unsigned int convert : 1;
|
||||
int compression_level;
|
||||
struct string_list extra_files;
|
||||
struct pretty_print_context *pretty_ctx;
|
||||
};
|
||||
|
||||
/* main api */
|
||||
|
||||
Reference in New Issue
Block a user