aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@netscape.net>2017-08-17 20:26:53 +0200
committerFrédéric Buclin <LpSolit@netscape.net>2017-08-17 20:26:53 +0200
commit08fa219c0ae361c351271ec47b2efa2daa97b902 (patch)
tree540f68261c0b3141ca1f38a3e3cbe32a7acaa534
parentb3cd785e1f0e86d59ce6e66f3789fe717d38e676 (diff)
downloadbugs-08fa219c0ae361c351271ec47b2efa2daa97b902.tar
bugs-08fa219c0ae361c351271ec47b2efa2daa97b902.tar.gz
bugs-08fa219c0ae361c351271ec47b2efa2daa97b902.tar.bz2
bugs-08fa219c0ae361c351271ec47b2efa2daa97b902.tar.xz
bugs-08fa219c0ae361c351271ec47b2efa2daa97b902.zip
Bug 1306534: Crash when pasting UTF8 text as an attachment (PostgreSQL only)
-rwxr-xr-xattachment.cgi1
1 files changed, 1 insertions, 0 deletions
diff --git a/attachment.cgi b/attachment.cgi
index 40b0c9d3a..e4761a805 100755
--- a/attachment.cgi
+++ b/attachment.cgi
@@ -502,6 +502,7 @@ sub insert {
# Get the filehandle of the attachment.
my $data_fh = $cgi->upload('data');
my $attach_text = $cgi->param('attach_text');
+ utf8::encode($attach_text) if $attach_text;
my $attachment = Bugzilla::Attachment->create(
{bug => $bug,