9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] mimetype: add entry for .patch extension
@ 2021-02-07 23:07 Michael Forney
  2021-02-09  5:08 ` ori
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Forney @ 2021-02-07 23:07 UTC (permalink / raw)
  To: 9front

This way, upas/vf won't flag .patch files as suspicious by default.

diff 55083200f5d1392076feb1bd51625d02d46a9698 9ff94047ba6fbb83806c7c3a86be6f2f897ef7b5
--- a/sys/lib/mimetype	Sun Feb  7 15:01:36 2021
+++ b/sys/lib/mimetype	Sun Feb  7 15:07:37 2021
@@ -91,6 +91,7 @@
 .p		text		plain			-	y # Pascal program
 .p7m		application	x-pkcs7-mime		-	y # SMIME
 .p7s		application	x-pkcs7-signature	-	y # SMIME
+.patch		text		plain		-		y
 .pbm		image		x-portable-bitmap	-	y
 .pdf		application	pdf		-		y # Adobe Portable Document Format
 .pif		application	octet-stream	-		r # DOS executable

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9front] mimetype: add entry for .patch extension
  2021-02-07 23:07 [9front] mimetype: add entry for .patch extension Michael Forney
@ 2021-02-09  5:08 ` ori
  2021-02-10  2:54   ` Lyndon Nerenberg (VE7TFX/VE6BBM)
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: ori @ 2021-02-09  5:08 UTC (permalink / raw)
  To: 9front

Quoth Michael Forney <mforney@mforney.org>:
> This way, upas/vf won't flag .patch files as suspicious by default.
> 
> diff 55083200f5d1392076feb1bd51625d02d46a9698 9ff94047ba6fbb83806c7c3a86be6f2f897ef7b5
> --- a/sys/lib/mimetype	Sun Feb  7 15:01:36 2021
> +++ b/sys/lib/mimetype	Sun Feb  7 15:07:37 2021
> @@ -91,6 +91,7 @@
>  .p		text		plain			-	y # Pascal program
>  .p7m		application	x-pkcs7-mime		-	y # SMIME
>  .p7s		application	x-pkcs7-signature	-	y # SMIME
> +.patch		text		plain		-		y
>  .pbm		image		x-portable-bitmap	-	y
>  .pdf		application	pdf		-		y # Adobe Portable Document Format
>  .pif		application	octet-stream	-		r # DOS executable
> 

Seems good, but for most purposes, it also seems
reasonable to just 'rm /mail/lib/validateattachment';
I don't think it really does anything useful for mail
on plan 9.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9front] mimetype: add entry for .patch extension
  2021-02-09  5:08 ` ori
@ 2021-02-10  2:54   ` Lyndon Nerenberg (VE7TFX/VE6BBM)
  2021-02-10  7:31   ` sirjofri
  2021-02-10 21:59   ` Michael Forney
  2 siblings, 0 replies; 6+ messages in thread
From: Lyndon Nerenberg (VE7TFX/VE6BBM) @ 2021-02-10  2:54 UTC (permalink / raw)
  To: 9front, ori

ori@eigenstate.org writes:

> Seems good, but for most purposes, it also seems
> reasonable to just 'rm /mail/lib/validateattachment';
> I don't think it really does anything useful for mail
> on plan 9.

+1.  Cheking against file extensions tells you nothing.  It has
always puzzled me why software that cares about this doesn't look
at the actual content ala 'file -m'.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9front] mimetype: add entry for .patch extension
  2021-02-09  5:08 ` ori
  2021-02-10  2:54   ` Lyndon Nerenberg (VE7TFX/VE6BBM)
@ 2021-02-10  7:31   ` sirjofri
  2021-02-10 12:18     ` hiro
  2021-02-10 21:59   ` Michael Forney
  2 siblings, 1 reply; 6+ messages in thread
From: sirjofri @ 2021-02-10  7:31 UTC (permalink / raw)
  To: 9front


09.02.2021 06:08:56 ori@eigenstate.org:
> Quoth Michael Forney <mforney@mforney.org>:
>> This way, upas/vf won't flag .patch files as suspicious by default.
>>
>> diff [...]
>
> Seems good, but for most purposes, it also seems
> reasonable to just 'rm /mail/lib/validateattachment';
> I don't think it really does anything useful for mail
> on plan 9.

If you don't think about mail, but http servers: at least rc-httpd uses 
it to construct content-type headers. It extends this list (which btw 
doesn't include css and js). I'm not sure about ip/httpd or tcp80.

I have some extensions for rc-httpd I did for gridchat-web, that included 
basic range handling as well as POST. I wanted to prepare a patch. It's 
on https://github.com/sirjofri/gridchat-web, if someone else wants to do 
it (it's very easy, but contains one auxiliary native program for range 
handling. I can try some chain using cat file | {read -c $start 
>/dev/null; read -c $end} instead and see if it's faster than dd. Sorry 
for offtopic).

sirjofri

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9front] mimetype: add entry for .patch extension
  2021-02-10  7:31   ` sirjofri
@ 2021-02-10 12:18     ` hiro
  0 siblings, 0 replies; 6+ messages in thread
From: hiro @ 2021-02-10 12:18 UTC (permalink / raw)
  To: 9front

i still want a virus encoded either into a filename or into some magic
bytes that file will stumble over hahaha :D

lyndon's point stands, also for webservers.

it's silly that webservers are expected to run filename heuristics
just so that it can lie to the browser about what filetype it might
be.

it breaks too often in practice, i don't like it.

and the browser never does what i want, i can't force it to just
DISPLAY the image even though the webserver claims it can only be
downloaded to disk.

maybe all this together is even more messy than that little itch with
mail content types that makes people feel so much more safe
doubleclicking on every attachment they get.

On 2/10/21, sirjofri <sirjofri+ml-9front@sirjofri.de> wrote:
>
> 09.02.2021 06:08:56 ori@eigenstate.org:
>> Quoth Michael Forney <mforney@mforney.org>:
>>> This way, upas/vf won't flag .patch files as suspicious by default.
>>>
>>> diff [...]
>>
>> Seems good, but for most purposes, it also seems
>> reasonable to just 'rm /mail/lib/validateattachment';
>> I don't think it really does anything useful for mail
>> on plan 9.
>
> If you don't think about mail, but http servers: at least rc-httpd uses
> it to construct content-type headers. It extends this list (which btw
> doesn't include css and js). I'm not sure about ip/httpd or tcp80.
>
> I have some extensions for rc-httpd I did for gridchat-web, that included
> basic range handling as well as POST. I wanted to prepare a patch. It's
> on https://github.com/sirjofri/gridchat-web, if someone else wants to do
> it (it's very easy, but contains one auxiliary native program for range
> handling. I can try some chain using cat file | {read -c $start
>>/dev/null; read -c $end} instead and see if it's faster than dd. Sorry
> for offtopic).
>
> sirjofri
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9front] mimetype: add entry for .patch extension
  2021-02-09  5:08 ` ori
  2021-02-10  2:54   ` Lyndon Nerenberg (VE7TFX/VE6BBM)
  2021-02-10  7:31   ` sirjofri
@ 2021-02-10 21:59   ` Michael Forney
  2 siblings, 0 replies; 6+ messages in thread
From: Michael Forney @ 2021-02-10 21:59 UTC (permalink / raw)
  To: 9front

On 2021-02-08, ori@eigenstate.org <ori@eigenstate.org> wrote:
> Seems good, but for most purposes, it also seems
> reasonable to just 'rm /mail/lib/validateattachment';
> I don't think it really does anything useful for mail
> on plan 9.

I don't think this alone is sufficient, if validateattachment is
missing it will cause upas/vf to flag *all* attachments with an
unknown extension as suspicious.

Removing upas/vf from the pipeline in /mail/lib/qmail does have the
desired effect, though.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-02-10 22:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-07 23:07 [9front] mimetype: add entry for .patch extension Michael Forney
2021-02-09  5:08 ` ori
2021-02-10  2:54   ` Lyndon Nerenberg (VE7TFX/VE6BBM)
2021-02-10  7:31   ` sirjofri
2021-02-10 12:18     ` hiro
2021-02-10 21:59   ` Michael Forney

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).