]> 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:07:32 +0000 (19:07 -0400)
r=dylan

Bugzilla/Attachment.pm

index ec318b021fda723c83e5fa83a76228b6025cb165..5a7a50e590ae0a61d2fe8f7d9f85857c85fff108 100644 (file)
@@ -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();