From: lpsolit%gmail.com <> Date: Mon, 5 Nov 2007 01:43:58 +0000 (+0000) Subject: Bug 402438: Invalid deadlines can be set by unauthorized users - Patch by FrédÃ... X-Git-Tag: bugzilla-3.1.3~476 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1dc414f91dd77d3141ba0a46b41e5620e76e438;p=thirdparty%2Fbugzilla.git Bug 402438: Invalid deadlines can be set by unauthorized users - Patch by Frédéric Buclin r/a=mkanat --- diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 7ffc3b52e3..7a4c02e89a 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