From a39a4ef297b2435cbd4a4ef50d459b68c8bb6106 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 21 Oct 2006 06:21:08 +0000 Subject: [PATCH] =?utf8?q?Bug=20356328:=20$rankdir=20should=20be=20validat?= =?utf8?q?ed=20in=20showdependencygraph.cgi=20-=20Patch=20by=20Fr=C3=A9d?= =?utf8?q?=C3=A9ric=20Buclin=20=20r=3Dbkor=20a=3Dmyk?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- showdependencygraph.cgi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/showdependencygraph.cgi b/showdependencygraph.cgi index e483fd0f88..2cea9b2f2d 100755 --- a/showdependencygraph.cgi +++ b/showdependencygraph.cgi @@ -96,7 +96,16 @@ sub AddLink { } } +# The list of valid directions. Some are not proposed in the dropdrown +# menu despite they are valid ones. +my @valid_rankdirs = ('LR', 'RL', 'TB', 'BT'); + my $rankdir = $cgi->param('rankdir') || "LR"; +# Make sure the submitted 'rankdir' value is valid. +if (lsearch(\@valid_rankdirs, $rankdir) < 0) { + $rankdir = 'LR'; +} + my $webdotdir = bz_locations()->{'webdotdir'}; if (!defined $cgi->param('id') && !defined $cgi->param('doall')) { -- 2.47.2