]> Sergey Matveev's repositories - public-inbox.git/commit
inboxwritable: fix From_ line unescaping
authorEric Wong <e@yhbt.net>
Sat, 4 Apr 2020 06:17:29 +0000 (06:17 +0000)
committerEric Wong <e@yhbt.net>
Sat, 4 Apr 2020 17:48:58 +0000 (17:48 +0000)
commitf63bdad8579f96901e08d2e7d9cd46ea528ffcce
tree462323d278fd121f24880cd6e586e63ff54f93f1
parent1a02e2d367b71eca9fc8093ce83fcae50873003d
inboxwritable: fix From_ line unescaping

We can't rely on Email::MIME noticing the change to our
scalar ref after calling `PublicInbox::MIME->new'.

This is because Email::MIME::body_set (unlike
Email::Simple::body_set) will copy the contents of the body into
`->{body_raw}' as a new scalar.

Furthermore, we need to escape multiple From lines in the body,
not just the first one, using the `g' modifier to `s//'.

Reported-by: Kyle Meyer <kyle@kyleam.com>
lib/PublicInbox/InboxWritable.pm