git-serve: Fix broken SQL statement
diff mbox

Message ID 20170808133701.6176-1-lfleischer@archlinux.org
State Accepted, archived
Headers show

Commit Message

Lukas Fleischer Aug. 8, 2017, 1:37 p.m. UTC
Add a missing space to the SQL statement performing the disown
operation.

Fixes FS#55068.

Note that the broken query was not discovered by the test suite since
SQLite parses "?AND" inside prepared statements gracefully while MySQL
does not.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
---
 aurweb/git/serve.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox

diff --git a/aurweb/git/serve.py b/aurweb/git/serve.py
index eea0c9c..dfaddd1 100755
--- a/aurweb/git/serve.py
+++ b/aurweb/git/serve.py
@@ -192,7 +192,7 @@  def pkgreq_by_pkgbase(pkgbase_id, reqtype):
                        "INNER JOIN RequestTypes ON " +
                        "RequestTypes.ID = PackageRequests.ReqTypeID " +
                        "WHERE PackageRequests.Status = 0 " +
-                       "AND PackageRequests.PackageBaseID = ?" +
+                       "AND PackageRequests.PackageBaseID = ? " +
                        "AND RequestTypes.Name = ?", [pkgbase_id, reqtype])
 
     return [row[0] for row in cur.fetchall()]