leahneukirchen / mblaze

Unix utilities to deal with Maildir
Other
441 stars 48 forks source link

mcom: do not match shebang in needs_multipart() #196

Closed codesoap closed 3 years ago

codesoap commented 3 years ago

Avoids matching lines like #!/usr/bin/env sh. Also require at least one character after /.

leahneukirchen commented 3 years ago

Ok, but running mmime does no harm here right?

leahneukirchen commented 3 years ago

I'd probably use a regexp that matches what we do in mmime.c

codesoap commented 3 years ago

Ok, but running mmime does no harm here right?

Running mmime doesn't do much harm, but it changes the message encoding from text/plain to multipart/mixed.

I'd probably use a regexp that matches what we do in mmime.c

OK, thanks for the hint. I'll take a look.

leahneukirchen commented 3 years ago

#[a-zA-Z]+/[a-zA-Z0-9+.;=#-]+ maybe?

codesoap commented 3 years ago

Looks good to me. I'll update the pull request.