From 12ca18325104618f3d66faf815e7b71e7b14b213 Mon Sep 17 00:00:00 2001 From: Matt Tyson Date: Tue, 28 Jul 2015 18:39:33 +0200 Subject: Bug 1186700: Inserting data into the mail_staging table fails on PostgreSQL due to unspecified BLOB type r=gerv a=sgreen --- Bugzilla/Mailer.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Bugzilla/Mailer.pm b/Bugzilla/Mailer.pm index 1931a2ff9..69db9c557 100644 --- a/Bugzilla/Mailer.pm +++ b/Bugzilla/Mailer.pm @@ -122,7 +122,10 @@ sub MessageToMTA { # The e-mail string may contain tainted values. my $string = $email->as_string; trick_taint($string); - $dbh->do("INSERT INTO mail_staging (message) VALUES(?)", undef, $string); + + my $sth = $dbh->prepare("INSERT INTO mail_staging (message) VALUES (?)"); + $sth->bind_param(1, $string, $dbh->BLOB_TYPE); + $sth->execute; return; } -- cgit v1.2.3-24-g4f1b