From 1c5ecdf1c8d11dbd47f1361bc11565d1175c81bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= Date: Tue, 15 Mar 2016 17:11:52 +0100 Subject: Bug 1253267: Possible DOT injection vulnerability in dependency graphs if long bug summaries are wrapped r/a=dkl --- showdependencygraph.cgi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/showdependencygraph.cgi b/showdependencygraph.cgi index 476df1e8e..6d4cb1e71 100755 --- a/showdependencygraph.cgi +++ b/showdependencygraph.cgi @@ -198,6 +198,9 @@ foreach my $k (@bug_ids) { utf8::encode($summary) if utf8::is_utf8($summary); } $summary =~ s/([\\\"])/\\$1/g; + # Newlines must be escaped too, to not break the .map file + # and to prevent code injection. + $summary =~ s/\n/\\n/g; push(@params, qq{label="$k\\n$summary"}); } -- cgit v1.2.1