]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1186700: Inserting data into the mail_staging table fails on PostgreSQL due to...
authorMatt Tyson <mtyson@redhat.com>
Tue, 28 Jul 2015 16:39:33 +0000 (18:39 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Tue, 28 Jul 2015 16:39:33 +0000 (18:39 +0200)
r=gerv a=sgreen

Bugzilla/Mailer.pm

index 1931a2ff9caace89bf10b42587ffc23000c0e971..69db9c55782451a4d345a79945e5f0a72d470840 100644 (file)
@@ -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;
     }