aerc/commands/msgview
Leszek Cimała 4f2892695e failback to Content-Type filename when encoded Content-Disposition is used
Hi!
This patch will fix missing filename if it is RFC2231 encoded with charset
different then ASCII or UTF8. Example how it looks like in mail:

Content-Type: application/pdf;
 name="=?UTF-8?Q?Opis_przedmiotu_zam=c3=b3wienia_-_za=c5=82=c4=85cznik_nr_1?=
 =?UTF-8?Q?=2epdf?="
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename*0*=iso-8859-2''%4F%70%69%73%20%70%72%7A%65%64%6D%69%6F%74%75%20;
 filename*1*=%7A%61%6D%F3%77%69%65%6E%69%61%20%2D%20%7A%61%B3%B1%63%7A%6E;
 filename*2*=%69%6B%20%6E%72%20%31%2E%70%64%66

Yes, this should be forbidden :-). Anyway, best solotion in such cases
is to failback to Content-Type name. I am not sure if it is guaranted to
be there, but probably it will.

Leszek
2019-12-07 14:30:35 -05:00
..
close.go Cleanup pager processes after closing a msgviewer 2019-10-16 11:13:53 -04:00
msgview.go Implement basic tab completion support 2019-06-29 14:24:19 -04:00
next-part.go all: use fmt.Errorf for fomartting errors 2019-09-04 16:30:57 -10:00
next.go commands: move ParseNextPrevMessage error value to its last return value 2019-09-04 16:30:57 -10:00
open.go all: purge redundant underscores 2019-09-04 16:30:57 -10:00
save.go failback to Content-Type filename when encoded Content-Disposition is used 2019-12-07 14:30:35 -05:00
toggle-headers.go all: use fmt.Errorf for fomartting errors 2019-09-04 16:30:57 -10:00