Skip to content
Snippets Groups Projects
Commit 1ee2451e authored by Jani Nikula's avatar Jani Nikula
Browse files

dim: fix message_print_body() for complex multipart messages

Commit e9846737 ("dim: Dumbest base64 parser ever for apply-pull")
broke dim apply-pull for complex multipart messages, such as [1] with
mime structure:

└┬╴multipart/mixed 11398 bytes
 ├┬╴multipart/signed inline 2051 bytes
 │├─╴text/plain inline 1470 bytes
 │└─╴application/pgp-signature [signature.asc] 195 bytes
 └─╴text/plain inline 219 bytes

The problem lies in the original message_print_body() which would not
recurse beyond the first multipart nesting level. Use the message walk()
function to also find the text/plain part within the multipart/signed
part.

[1] http://mid.mail-archive.com/20190117074604.GI18272@zhen-hp.sh.intel.com



v2: only print text/plain (Daniel)

Fixes: f9bd24c2 ("dim: Add extract-tags command")
Fixes: e9846737 ("dim: Dumbest base64 parser ever for apply-pull")
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 1df43927
No related branches found
No related tags found
No related merge requests found
Checking pipeline status
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment