Spaces:
Sleeping
Sleeping
talexm
commited on
Commit
•
0c3cda8
1
Parent(s):
eb579c5
update
Browse files
rag_sec/query_transformer.py
CHANGED
@@ -1,5 +1,7 @@
|
|
1 |
class QueryTransformer:
|
2 |
def transform_query(self, query):
|
3 |
-
if "DROP TABLE" in query or "SELECT *" in query:
|
4 |
-
return "Your query appears to contain SQL injection elements. Please rephrase."
|
5 |
return query
|
|
|
|
|
|
|
|
|
|
1 |
class QueryTransformer:
|
2 |
def transform_query(self, query):
|
|
|
|
|
3 |
return query
|
4 |
+
|
5 |
+
|
6 |
+
|
7 |
+
### Need to be implemented in case of re-try on query with not complete or clear request
|