Skip to content

Commit

Permalink
Merge pull request #11 from ironjunk/bug-fix
Browse files Browse the repository at this point in the history
Updated check_text function
  • Loading branch information
ironjunk committed Apr 29, 2023
2 parents 226a36c + 66c1f94 commit 448ae39
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@

# func: to check if text does not contain any malicious code
def check_text(text = None):
text_split = text.split(" ")

bad_keywords = ["create", "delete", "update", "alter", "and", "or", "not"]

for keyword in bad_keywords:
if keyword in text:
for word in text_split:
if word in bad_keywords:
return False

return True
Expand Down

0 comments on commit 448ae39

Please sign in to comment.