From: lpsolit%gmail.com <> Date: Wed, 17 Jan 2007 06:50:02 +0000 (+0000) Subject: Bug 367077: Big attachments which should be stored locally are not - Patch by FrÃ... X-Git-Tag: bugzilla-2.23.4~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a33252e3ac8d46230f3bf63eaef2b717900a878;p=thirdparty%2Fbugzilla.git Bug 367077: Big attachments which should be stored locally are not - Patch by Frédéric Buclin r=wurblzap a=LpSolit --- diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index fe1b781c9a..6a798d046e 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -749,7 +749,10 @@ sub insert_attachment_for_bug { unless ($cgi->param('ispatch')) { $class->validate_content_type($throw_error) || return 0; } - $data = _validate_data($throw_error, $hr_vars) || return 0; + $data = _validate_data($throw_error, $hr_vars); + # If the attachment is stored locally, $data eq ''. + # If an error is thrown, $data eq '0'. + ($data ne '0') || return 0; $contenttype = $cgi->param('contenttype'); # These are inserted using placeholders so no need to panic