sql wansn't escaped on inserting package sources

This commit is contained in:
simo 2006-11-23 19:24:08 +00:00
parent a103c7b14c
commit 89d6607684

View file

@ -162,7 +162,7 @@ class PackageDatabase:
# PackageSources
for source in package.sources:
q.execute("INSERT INTO PackageSources (PackageID, Source) " +
"VALUES (" + str(id) + ", '" + source + "')")
"VALUES (" + str(id) + ", '" + MySQLdb.escape_string(source) + "')")
# PackageDepends
for dep in package.depends:
depid = self.lookupOrDummy(dep)