From: Matt Tyson Date: Tue, 11 Oct 2016 23:07:32 +0000 (-0400) Subject: Bug 1306534 - Crash when pasting UTF8 text as an attachment X-Git-Tag: release-5.0.4~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=89cb60fe38a7962c876bce18368db90cedda84eb;p=thirdparty%2Fbugzilla.git Bug 1306534 - Crash when pasting UTF8 text as an attachment r=dylan --- diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index 33183797ba..5e25681c38 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -853,6 +853,7 @@ sub create { (id, thedata) VALUES ($attachid, ?)"); trick_taint($data); + utf8::encode($data); $sth->bind_param(1, $data, $dbh->BLOB_TYPE); $sth->execute();