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.1.2~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1b9ed5d96a4738471559c9a275eabc4333d74f4;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 ec318b021f..5a7a50e590 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -891,6 +891,7 @@ sub create { (id, thedata) VALUES ($attachid, ?)"); trick_taint($data); + utf8::encode($data); $sth->bind_param(1, $data, $dbh->BLOB_TYPE); $sth->execute();