Handle un-quoted filenames
authorJamie Cameron <jcameron@webmin.com>
Wed, 22 Sep 2010 17:10:53 +0000 (10:10 -0700)
committerJamie Cameron <jcameron@webmin.com>
Wed, 22 Sep 2010 17:10:53 +0000 (10:10 -0700)
mailboxes/boxes-lib.pl

index 714320c..f914b29 100755 (executable)
@@ -441,7 +441,11 @@ if ($ct =~ /multipart\/(\S+)/i && ($ct =~ /boundary="([^"]+)"/i ||
                        $attach->{'filename'} = $1;
                        }
                elsif ($attach->{'header'}->{'content-type'} =~
-                   /name\s*=\s*"([^"]+)"/i) {
+                      /name\s*=\s*"([^"]+)"/i) {
+                       $attach->{'filename'} = $1;
+                       }
+               elsif ($attach->{'header'}->{'content-type'} =~
+                      /name\s*=\s*([^;\s]+)/i) {
                        $attach->{'filename'} = $1;
                        }