tests/unwrap-message-id.py
author Sandu Turcan <idlsoft@gmail.com>
Tue, 03 May 2022 21:44:30 -0400
branchstable
changeset 49241 6b10151b9621
parent 44405 a1908951ca42
child 48875 6000f5b25c9b
permissions -rw-r--r--
narrow_widen_acl: enforce narrowacl in narrow_widen (SEC) Reviewer note: this was sent by the author as a simple bugfix, but can be considered a security patch, since it allows users to access things outside of the ACL, hence the (SEC) prefix. However, this affects the `narrow` extention which is still marked as experimental and has relatively few users aside from large companies with their own security layers on top from what we can gather. We feel (Alphare: or at least, I feel) like pinging the packaging list is enough in this case.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
43334
4128ffba4431 tests: handle Message-Id email header possible wrapping
Denis Laxalde <denis@laxalde.org>
parents:
diff changeset
     1
from __future__ import absolute_import, print_function
4128ffba4431 tests: handle Message-Id email header possible wrapping
Denis Laxalde <denis@laxalde.org>
parents:
diff changeset
     2
4128ffba4431 tests: handle Message-Id email header possible wrapping
Denis Laxalde <denis@laxalde.org>
parents:
diff changeset
     3
import sys
4128ffba4431 tests: handle Message-Id email header possible wrapping
Denis Laxalde <denis@laxalde.org>
parents:
diff changeset
     4
44405
a1908951ca42 tests: handle In-Reply-To headers for line wrapping
Joerg Sonnenberger <joerg@bec.de>
parents: 43334
diff changeset
     5
for line in sys.stdin:
a1908951ca42 tests: handle In-Reply-To headers for line wrapping
Joerg Sonnenberger <joerg@bec.de>
parents: 43334
diff changeset
     6
    if line.lower() in ("message-id: \n", "in-reply-to: \n"):
a1908951ca42 tests: handle In-Reply-To headers for line wrapping
Joerg Sonnenberger <joerg@bec.de>
parents: 43334
diff changeset
     7
        line = line[:-2]
a1908951ca42 tests: handle In-Reply-To headers for line wrapping
Joerg Sonnenberger <joerg@bec.de>
parents: 43334
diff changeset
     8
    print(line, end="")