Closed Knyffen closed 2 years ago
I do agree that adding the '?' is needed. Thank you, Jonas!
The fix is on github. Usually, I create new releases when I have collected a few.
Great! Thank you for the quick response! Have a nice day :-)
Oh, and my name is Jonas Ryssel. Knyffen is my alias on the internet, but either is fine. Sorry for the confusion (I didn't expect to get my name in there). :-)
Hello
When a comma separated list contains multiple names are encoded, the
consumePhrase
function inMail::Message::Field::Full
contains a greedy regex that spans across multiple email addresses. An example is "=?utf-8?q?foo?= bar@mail.com, =?utf-8?q?baz?= qux@mail.com" whereconsumePhrase
greedily selects the entirety of "=?utf-8?q?foo?= bar@mail.com, =?utf-8?q?baz?=" as the phrase.I believe that the issue can be fixed by replacing
elsif($string =~ s/^\s*((?:\=\?.*\?\=|[${atext}${atext_ill}\ \t.])+)//o )
withelsif($string =~ s/^\s*((?:\=\?.*?\?\=|[${atext}${atext_ill}\ \t.])+)//o )
on https://github.com/markov2/perl5-Mail-Message/blob/a49dad0509c16db0539fdeb8d80be8c048b2a50b/lib/Mail/Message/Field/Full.pm#L643 to make it non-greedy.Best regards Jonas