[SPIP] ~2.1.12 -->2.1.25
[velocampus/web/www.git] / www / ecrire / action / charger_plugin.php
index 0d9891d..6f0fdd8 100644 (file)
@@ -3,7 +3,7 @@
 /***************************************************************************\
  *  SPIP, Systeme de publication pour l'internet                           *
  *                                                                         *
- *  Copyright (c) 2001-2011                                                *
+ *  Copyright (c) 2001-2014                                                *
  *  Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James  *
  *                                                                         *
  *  Ce programme est un logiciel libre distribue sous licence GNU/GPL.     *
@@ -88,7 +88,7 @@ function action_charger_plugin_dist() {
 
                if (preg_match(",^Content-Type:\s*application/zip$,Uims",$head))
                        $extension = "zip";
-               elseif (preg_match(",^Content-Disposition:\s*attachment;\s*filename=(.*)$,Uims",$head,$m)){
+               elseif (preg_match(',^Content-Disposition:\s*attachment;\s*filename="?([^"]+)"?$,Uims',$head,$m)){
                        $f = $m[1];
                        if (pathinfo($f, PATHINFO_EXTENSION)=="zip"){
                                $fichier = (_request('fichier')?