summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Tyson <mtyson@redhat.com>2015-07-28 18:39:33 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2015-07-28 18:39:33 +0200
commit12ca18325104618f3d66faf815e7b71e7b14b213 (patch)
treec60db8889f11e214bb07d8418390a27bf5cd6028
parent61a971cd65be2eaaa923af0f17a00159cc0e8222 (diff)
downloadbugzilla-12ca18325104618f3d66faf815e7b71e7b14b213.tar.gz
bugzilla-12ca18325104618f3d66faf815e7b71e7b14b213.tar.xz
Bug 1186700: Inserting data into the mail_staging table fails on PostgreSQL due to unspecified BLOB type
r=gerv a=sgreen
-rw-r--r--Bugzilla/Mailer.pm5
1 files changed, 4 insertions, 1 deletions
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;
}