Skip to content

Commit 4cfe228

Browse files
committed
filtermail: further optimize check_armored_payload()
1 parent 741a204 commit 4cfe228

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chatmaild/src/chatmaild/filtermail.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def check_armored_payload(payload: str, outgoing: bool):
106106
if outgoing: # Disallow comments in outgoing messages
107107
return False
108108
# Remove comments from incoming messages
109-
payload = payload.split("\r\n", maxsplit=1)[1]
109+
payload = payload.partition("\r\n")[2]
110110

111111
while payload.startswith("\r\n"):
112112
payload = payload.removeprefix("\r\n")

0 commit comments

Comments
 (0)