Fixed a bug in the charset handling of individual parts in multipart email messages in ietf.nomcom.get_body()

- Legacy-Id: 18615
This commit is contained in:
Henrik Levkowetz 2020-10-13 10:57:23 +00:00
parent 779087d24b
commit eaf9546d0e
2 changed files with 10 additions and 1 deletions

View file

@ -108,6 +108,15 @@ RUN apt-get install -qy \
zile \
zlib1g-dev
# Postgresql packages
RUN apt-get install -qy \
postgresql-11 \
postgresql-server-dev-11
RUN pip install \
psycopg2
# Get the key used to sign the libyang repo
RUN wget -nv http://download.opensuse.org/repositories/home:liberouter/Debian_9.0/Release.key
RUN apt-key add - < Release.key

View file

@ -437,7 +437,7 @@ def get_body(message):
'plain')]
body = []
for part in text_parts:
charset = get_charset(message)
charset = get_charset(part)
body.append(get_payload_text(part, default_charset=charset))
return "\n".join(body).strip()