diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-05-07 11:20:10 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-05-07 11:53:56 -0400 |
commit | b1d463c624e5cef483bed2a809edd6c4eecff93f (patch) | |
tree | fc85712489a81b56b31c247f9030daecc441335e | |
parent | d7cdc5baa1f08d7d8a3a224671c6a414ecd94e9d (diff) | |
download | b4-b1d463c624e5cef483bed2a809edd6c4eecff93f.tar.gz |
Remove QP encoding when getting fromname
Make sure we get the clean header value when we store fromname.
Link: https://linux.kernel.org/g/tools/message/142
Reported-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r-- | b4/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/b4/__init__.py b/b4/__init__.py index e73bb5a..6ae284b 100644 --- a/b4/__init__.py +++ b/b4/__init__.py @@ -646,7 +646,8 @@ class LoreMessage: self.in_reply_to = LoreMessage.get_clean_msgid(self.msg, header='In-Reply-To') try: - fromdata = email.utils.getaddresses([str(x) for x in self.msg.get_all('from', [])])[0] + fromdata = email.utils.getaddresses([LoreMessage.clean_header(str(x)) + for x in self.msg.get_all('from', [])])[0] self.fromname = fromdata[0] self.fromemail = fromdata[1] if not len(self.fromname.strip()): |