X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fdatabase.py;h=fc8dd677d9dd0d91ed857a24ccea7648d0e98eaa;hb=99576eb9184993f1a169c9c2b6cbd5b1caee69af;hp=a52555682624ca8aac8fa693acac8f805eb797f4;hpb=28c46824f41d6be76886595957c0c9a2e4bf0f8d;p=dak.git diff --git a/daklib/database.py b/daklib/database.py index a5255568..fc8dd677 100755 --- a/daklib/database.py +++ b/daklib/database.py @@ -34,6 +34,7 @@ import sys import time import types import utils +import pg from binary import Binary ################################################################################ @@ -907,7 +908,7 @@ def add_new_comment(package, version, comment, author): projectB.query(""" INSERT INTO new_comments (package, version, comment, author) VALUES ('%s', '%s', '%s', '%s') - """ % (package, version, comment, author) ) + """ % (package, version, pg.escape_string(comment), pg.escape_string(author))) return