From 8a33252e3ac8d46230f3bf63eaef2b717900a878 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 17 Jan 2007 06:50:02 +0000 Subject: Bug 367077: Big attachments which should be stored locally are not - Patch by Frédéric Buclin r=wurblzap a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/Attachment.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Bugzilla') diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index fe1b781c9..6a798d046 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 -- cgit v1.2.3-24-g4f1b