mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-12 03:41:02 +00:00
Fix incorrect parsing of headers containing equal character (#7303)
* Fix incorrect parsing of header containing equal character * Add changelog fragment * Update changelogs/fragments/7303-mail-incorrect-header-parsing.yml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -354,7 +354,7 @@ def main():
|
||||
# NOTE: Backward compatible with old syntax using '|' as delimiter
|
||||
for hdr in [x.strip() for x in header.split('|')]:
|
||||
try:
|
||||
h_key, h_val = hdr.split('=')
|
||||
h_key, h_val = hdr.split('=', 1)
|
||||
h_val = to_native(Header(h_val, charset))
|
||||
msg.add_header(h_key, h_val)
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user