]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 402438: Invalid deadlines can be set by unauthorized users - Patch by FrédÃ...
authorlpsolit%gmail.com <>
Mon, 5 Nov 2007 01:43:58 +0000 (01:43 +0000)
committerlpsolit%gmail.com <>
Mon, 5 Nov 2007 01:43:58 +0000 (01:43 +0000)
Bugzilla/Bug.pm

index 7ffc3b52e3531addc898930506176763b4ffd174..7a4c02e89a7f6f2f13e6124dff7a9b0be5956d08 100755 (executable)
@@ -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