You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got a problem when I try to add schema name to the query. My code:
dbpool=app.config["pool"]
asyncwithdbpool.acquire() asconn:
sql=""" SELECT _id, name, address FROM "{schema}".account WHERE _id IN ( SELECT account_id FROM "{schema}"."account-message" WHERE message_id IN ( SELECT _id FROM "{schema}".message WHERE sender = $1 ) ); """.format(
schema=config.SCHEMA
)
resp=awaitconn.fetch(sql, address)
and it work very well, except for the lint:security give me a security issue:
Issue: [B608:hardcoded_sql_expressions] Possible SQL injection vector through string-based query construction.
And when I try to pass my schema name to conn.fetch() function but it didn't work. Can you help me?
The text was updated successfully, but these errors were encountered:
I got a problem when I try to add schema name to the query. My code:
and it work very well, except for the
lint:security
give me a security issue:And when I try to pass my schema name to
conn.fetch()
function but it didn't work. Can you help me?The text was updated successfully, but these errors were encountered: