mirror of
https://github.com/chatmail/relay.git
synced 2026-05-10 16:04:37 +00:00
filtermail: further optimize check_armored_payload()
This commit is contained in:
@@ -106,7 +106,7 @@ def check_armored_payload(payload: str, outgoing: bool):
|
||||
if outgoing: # Disallow comments in outgoing messages
|
||||
return False
|
||||
# Remove comments from incoming messages
|
||||
payload = payload.split("\r\n", maxsplit=1)[1]
|
||||
payload = payload.partition("\r\n")[2]
|
||||
|
||||
while payload.startswith("\r\n"):
|
||||
payload = payload.removeprefix("\r\n")
|
||||
|
||||
Reference in New Issue
Block a user