From f1dc414f91dd77d3141ba0a46b41e5620e76e438 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Mon, 5 Nov 2007 01:43:58 +0000 Subject: Bug 402438: Invalid deadlines can be set by unauthorized users - Patch by Frédéric Buclin r/a=mkanat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/Bug.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 7ffc3b52e..7a4c02e89 100755 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -946,7 +946,8 @@ sub _check_deadline { # Check time-tracking permissions. my $tt_group = Bugzilla->params->{"timetrackinggroup"}; - my $current = ref $invocant ? $invocant->deadline : undef; + # deadline() returns '' instead of undef if no deadline is set. + my $current = ref $invocant ? ($invocant->deadline || undef) : undef; return $current unless $tt_group && Bugzilla->user->in_group($tt_group); # Validate entered deadline -- cgit v1.2.3-24-g4f1b