Fix misdetection of filenames containing spaces.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 23 Oct 2011 12:14:07 +0000 (14:14 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 23 Oct 2011 12:14:07 +0000 (14:14 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
banana/mimepart.inc.php

index c29221e..b072242 100644 (file)
@@ -174,7 +174,7 @@ class BananaMimePart
             $disposition  = $this->getHeader('content-disposition', '/(inline|attachment)/i');
             $boundary     = $this->getHeader('content-type', '/boundary="?([^ "]+?)"?\s*(;|$)/i');
             $charset      = strtolower($this->getHeader('content-type', '/charset="?([^ "]+?)"?\s*(;|$)/i'));
-            $filename     = $this->getHeader('content-disposition', '/filename="?([^ "]+?)"?\s*(;|$)/i');
+            $filename     = $this->getHeader('content-disposition', '/filename="?([^"]+?)"?\s*(;|$)/i');
             $format       = strtolower($this->getHeader('content-type', '/format="?([^ "]+?)"?\s*(;|$)/i'));
             $id           = $this->getHeader('content-id', '/<(.*?)>/');
             $sign_protocole = strtolower($this->getHeader('content-type', '/protocol="?([^ "]+?)"?\s*(;|$)/i'));