Open
Description
Is it a security concern if I use the following approach to get data from my database?
def execute_query(self, query: str) -> list:
"""
Execute a query on the database and return the result.
Args:
query (str): The query to execute.
Returns:
list: The result of the query.
"""
cursor = self.mysql.connection.cursor()
cursor.execute(query)
result = cursor.fetchall()
cursor.close()
return result
If it's not safe can anyone suggest a better way to interact with my MySQL server with flask?
Metadata
Metadata
Assignees
Labels
No labels