aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-05-07 11:20:10 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-05-07 11:20:10 -0400
commit82c37bbbebae6678b68580ae11a161223a8ed7b4 (patch)
treeecdaa080105dd4b8ed6b465fe058e85606bf090d
parente38edc300448da8b365a819b7f178cfb0a4f69e7 (diff)
downloadb4-82c37bbbebae6678b68580ae11a161223a8ed7b4.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__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index 1361532..cc93adc 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -690,7 +690,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()):