summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-10-13 10:46:41 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-10-13 10:46:41 +0100
commitffa00870d1ce6ae18d11aa7511f432b7b184e1e9 (patch)
treecf0193c1571a8f5d866c8789148a1cafef466594 /dgit
parentcc236eb448eb278d367271964b96a81cb7d286db (diff)
dgit: Reject all git config options containing newlines
If we find something like this our regexp-based checking approaches are likely to fail and other strange may will go wrong. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit3
1 files changed, 3 insertions, 0 deletions
diff --git a/dgit b/dgit
index 6dbf166..a37e897 100755
--- a/dgit
+++ b/dgit
@@ -790,6 +790,9 @@ sub git_get_config ($) {
@$l==1 or badcfg
f_ "multiple values for %s (in %s git config)", $c, $src
if @$l > 1;
+ $l->[0] =~ m/\n/ and badcfg f_
+ "value for config option %s (in %s git config) contains newline(s)!",
+ $c, $src;
return $l->[0];
}
return undef;