]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1306534 - Crash when pasting UTF8 text as an attachment
authorMatt Tyson <mtyson@redhat.com>
Tue, 11 Oct 2016 23:07:32 +0000 (19:07 -0400)
committerDylan William Hardison <dylan@hardison.net>
Tue, 11 Oct 2016 23:08:48 +0000 (19:08 -0400)
r=dylan

Bugzilla/Attachment.pm

index 33183797ba276f7dd260a4382ee1a1e2b60cd40d..5e25681c384555789dc9597bad28ef81c50bb0bf 100644 (file)
@@ -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();