* [PR PATCH] mcom: do not match shebang in needs_multipart()
@ 2021-01-04 17:59 codesoap
2021-01-04 18:04 ` leahneukirchen
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: codesoap @ 2021-01-04 17:59 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 404 bytes --]
There is a new pull request by codesoap against master on the mblaze repository
https://github.com/codesoap/mblaze shebang
https://github.com/leahneukirchen/mblaze/pull/196
mcom: do not match shebang in needs_multipart()
Avoids matching lines like '#!/usr/bin/env sh'. Also require at least one character after '/'.
A patch file from https://github.com/leahneukirchen/mblaze/pull/196.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-shebang-196.patch --]
[-- Type: text/x-diff, Size: 631 bytes --]
From af81899c0cdb6cee5664ea57bdadd87d93af359c Mon Sep 17 00:00:00 2001
From: codesoap <codesoap@mailbox.org>
Date: Mon, 4 Jan 2021 18:55:48 +0100
Subject: [PATCH] mcom: do not match shebang in needs_multipart()
Avoids matching lines like '#!/usr/bin/env sh'. Also require at least
one character after '/'.
---
mcom | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mcom b/mcom
index f0de75c..c869fe3 100755
--- a/mcom
+++ b/mcom
@@ -75,7 +75,7 @@ stripempty() {
needs_multipart() {
mhdr -h attach "$1" >/dev/null ||
- grep -q '^#[^ ]*/[^ ]* ' "$1"
+ grep -qE '^#[^! ][^ ]*/[^ ]+ ' "$1"
}
do_mime() {
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: mcom: do not match shebang in needs_multipart()
2021-01-04 17:59 [PR PATCH] mcom: do not match shebang in needs_multipart() codesoap
@ 2021-01-04 18:04 ` leahneukirchen
2021-01-04 18:05 ` leahneukirchen
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: leahneukirchen @ 2021-01-04 18:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 182 bytes --]
New comment by leahneukirchen on mblaze repository
https://github.com/leahneukirchen/mblaze/pull/196#issuecomment-754126694
Comment:
Ok, but running mmime does no harm here right?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: mcom: do not match shebang in needs_multipart()
2021-01-04 17:59 [PR PATCH] mcom: do not match shebang in needs_multipart() codesoap
2021-01-04 18:04 ` leahneukirchen
@ 2021-01-04 18:05 ` leahneukirchen
2021-01-04 18:14 ` codesoap
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: leahneukirchen @ 2021-01-04 18:05 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 196 bytes --]
New comment by leahneukirchen on mblaze repository
https://github.com/leahneukirchen/mblaze/pull/196#issuecomment-754126894
Comment:
I'd probably use a regexp that matches what we do in mmime.c
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: mcom: do not match shebang in needs_multipart()
2021-01-04 17:59 [PR PATCH] mcom: do not match shebang in needs_multipart() codesoap
2021-01-04 18:04 ` leahneukirchen
2021-01-04 18:05 ` leahneukirchen
@ 2021-01-04 18:14 ` codesoap
2021-01-04 18:15 ` leahneukirchen
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: codesoap @ 2021-01-04 18:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 405 bytes --]
New comment by codesoap on mblaze repository
https://github.com/leahneukirchen/mblaze/pull/196#issuecomment-754131640
Comment:
> 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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: mcom: do not match shebang in needs_multipart()
2021-01-04 17:59 [PR PATCH] mcom: do not match shebang in needs_multipart() codesoap
` (2 preceding siblings ...)
2021-01-04 18:14 ` codesoap
@ 2021-01-04 18:15 ` leahneukirchen
2021-01-04 18:16 ` leahneukirchen
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: leahneukirchen @ 2021-01-04 18:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 168 bytes --]
New comment by leahneukirchen on mblaze repository
https://github.com/leahneukirchen/mblaze/pull/196#issuecomment-754132219
Comment:
`#[a-zA-Z]+/[a-zA-Z-#]+ ` maybe?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: mcom: do not match shebang in needs_multipart()
2021-01-04 17:59 [PR PATCH] mcom: do not match shebang in needs_multipart() codesoap
` (3 preceding siblings ...)
2021-01-04 18:15 ` leahneukirchen
@ 2021-01-04 18:16 ` leahneukirchen
2021-01-04 18:16 ` leahneukirchen
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: leahneukirchen @ 2021-01-04 18:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 171 bytes --]
New comment by leahneukirchen on mblaze repository
https://github.com/leahneukirchen/mblaze/pull/196#issuecomment-754132219
Comment:
`#[a-zA-Z]+/[a-zA-Z0-9#-]+ ` maybe?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: mcom: do not match shebang in needs_multipart()
2021-01-04 17:59 [PR PATCH] mcom: do not match shebang in needs_multipart() codesoap
` (4 preceding siblings ...)
2021-01-04 18:16 ` leahneukirchen
@ 2021-01-04 18:16 ` leahneukirchen
2021-01-04 18:19 ` codesoap
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: leahneukirchen @ 2021-01-04 18:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 175 bytes --]
New comment by leahneukirchen on mblaze repository
https://github.com/leahneukirchen/mblaze/pull/196#issuecomment-754132219
Comment:
`#[a-zA-Z]+/[a-zA-Z0-9+.;=#-]+ ` maybe?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: mcom: do not match shebang in needs_multipart()
2021-01-04 17:59 [PR PATCH] mcom: do not match shebang in needs_multipart() codesoap
` (5 preceding siblings ...)
2021-01-04 18:16 ` leahneukirchen
@ 2021-01-04 18:19 ` codesoap
2021-01-04 18:21 ` [PR PATCH] [Updated] " codesoap
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: codesoap @ 2021-01-04 18:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 176 bytes --]
New comment by codesoap on mblaze repository
https://github.com/leahneukirchen/mblaze/pull/196#issuecomment-754133988
Comment:
Looks good to me. Ill update the pull request.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PR PATCH] [Updated] mcom: do not match shebang in needs_multipart()
2021-01-04 17:59 [PR PATCH] mcom: do not match shebang in needs_multipart() codesoap
` (6 preceding siblings ...)
2021-01-04 18:19 ` codesoap
@ 2021-01-04 18:21 ` codesoap
2021-01-04 18:22 ` codesoap
2021-01-04 18:27 ` [PR PATCH] [Closed]: " leahneukirchen
9 siblings, 0 replies; 11+ messages in thread
From: codesoap @ 2021-01-04 18:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 409 bytes --]
There is an updated pull request by codesoap against master on the mblaze repository
https://github.com/codesoap/mblaze shebang
https://github.com/leahneukirchen/mblaze/pull/196
mcom: do not match shebang in needs_multipart()
Avoids matching lines like `#!/usr/bin/env sh`. Also require at least one character after `/`.
A patch file from https://github.com/leahneukirchen/mblaze/pull/196.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-shebang-196.patch --]
[-- Type: text/x-diff, Size: 596 bytes --]
From e37d2102e32977e4f17fb9c560fb0bcd6743b4be Mon Sep 17 00:00:00 2001
From: codesoap <codesoap@mailbox.org>
Date: Mon, 4 Jan 2021 18:55:48 +0100
Subject: [PATCH] mcom: do not match shebang in needs_multipart()
Avoids matching lines like '#!/usr/bin/env sh'.
---
mcom | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mcom b/mcom
index f0de75c..c378b33 100755
--- a/mcom
+++ b/mcom
@@ -75,7 +75,7 @@ stripempty() {
needs_multipart() {
mhdr -h attach "$1" >/dev/null ||
- grep -q '^#[^ ]*/[^ ]* ' "$1"
+ grep -qE '^#[a-zA-Z]+/[a-zA-Z0-9+.;=#-]+ ' "$1"
}
do_mime() {
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: mcom: do not match shebang in needs_multipart()
2021-01-04 17:59 [PR PATCH] mcom: do not match shebang in needs_multipart() codesoap
` (7 preceding siblings ...)
2021-01-04 18:21 ` [PR PATCH] [Updated] " codesoap
@ 2021-01-04 18:22 ` codesoap
2021-01-04 18:27 ` [PR PATCH] [Closed]: " leahneukirchen
9 siblings, 0 replies; 11+ messages in thread
From: codesoap @ 2021-01-04 18:22 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 177 bytes --]
New comment by codesoap on mblaze repository
https://github.com/leahneukirchen/mblaze/pull/196#issuecomment-754133988
Comment:
Looks good to me. I'll update the pull request.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PR PATCH] [Closed]: mcom: do not match shebang in needs_multipart()
2021-01-04 17:59 [PR PATCH] mcom: do not match shebang in needs_multipart() codesoap
` (8 preceding siblings ...)
2021-01-04 18:22 ` codesoap
@ 2021-01-04 18:27 ` leahneukirchen
9 siblings, 0 replies; 11+ messages in thread
From: leahneukirchen @ 2021-01-04 18:27 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 263 bytes --]
There's a closed pull request on the mblaze repository
mcom: do not match shebang in needs_multipart()
https://github.com/leahneukirchen/mblaze/pull/196
Description:
Avoids matching lines like `#!/usr/bin/env sh`. Also require at least one character after `/`.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-01-04 18:27 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-04 17:59 [PR PATCH] mcom: do not match shebang in needs_multipart() codesoap
2021-01-04 18:04 ` leahneukirchen
2021-01-04 18:05 ` leahneukirchen
2021-01-04 18:14 ` codesoap
2021-01-04 18:15 ` leahneukirchen
2021-01-04 18:16 ` leahneukirchen
2021-01-04 18:16 ` leahneukirchen
2021-01-04 18:19 ` codesoap
2021-01-04 18:21 ` [PR PATCH] [Updated] " codesoap
2021-01-04 18:22 ` codesoap
2021-01-04 18:27 ` [PR PATCH] [Closed]: " leahneukirchen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).