Skip to content

Commit d9d0e54

Browse files
committed
hotfix(functions.py) fix regex
1 parent de29abb commit d9d0e54

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

tux/utils/functions.py

+1-8
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,7 @@ def is_harmful(command: str) -> bool:
5555
return True
5656

5757
# Check for format commands
58-
if re.search(FORMAT_COMMANDS, command, re.IGNORECASE):
59-
return True
60-
61-
# Check for simple but dangerous rm patterns
62-
if re.search(r"rm.{0,5}[rfRF]", command, re.IGNORECASE): # noqa: SIM103
63-
return True
64-
65-
return False
58+
return bool(re.search(FORMAT_COMMANDS, command, re.IGNORECASE))
6659

6760

6861
def strip_formatting(content: str) -> str:

0 commit comments

Comments
 (0)