Skip to content

Commit

Permalink
Update routes.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tamar-borges authored Feb 8, 2025
1 parent 22e63a3 commit 3bde067
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def index():

if name:
cursor.execute(
"SELECT * FROM books WHERE name LIKE %s", name
"SELECT * FROM books WHERE name LIKE '%" + name + "%'"

Check failure

Code scanning / CodeQL

SQL query built from user-controlled sources High

This SQL query depends on a
user-provided value
.
)
books = [Book(*row) for row in cursor]

Expand Down

0 comments on commit 3bde067

Please sign in to comment.