[Fusionforge-commits] r9707 - in trunk/gforge: debian plugins/mediawiki/packaging/control plugins/mediawiki/www

Roland Mas lolando at libremir.placard.fr.eu.org
Mon May 10 15:20:09 CEST 2010


Author: lolando
Date: 2010-05-10 15:20:08 +0200 (Mon, 10 May 2010)
New Revision: 9707

Modified:
   trunk/gforge/debian/control
   trunk/gforge/plugins/mediawiki/packaging/control/160plugin-mediawiki
   trunk/gforge/plugins/mediawiki/www/plugin_admin.php
Log:
check image properties before accepting

Modified: trunk/gforge/debian/control
===================================================================
--- trunk/gforge/debian/control	2010-05-10 13:19:57 UTC (rev 9706)
+++ trunk/gforge/debian/control	2010-05-10 13:20:08 UTC (rev 9707)
@@ -84,7 +84,7 @@
 
 Package: gforge-web-apache2
 Architecture: all
-Depends: gforge-common, gforge-db-postgresql | gforge-db, libapache2-mod-php5, php5-cgi, php5-pgsql, php5-gd, perl, perl-suid, libdbi-perl, libdbd-pg-perl, debianutils (>= 1.7), debconf (>= 1.0.32) | debconf-2.0, ucf, cronolog, python, ssl-cert, libnusoap-php, php-htmlpurifier (>= 4.0), ${misc:Depends}
+Depends: gforge-common, gforge-db-postgresql | gforge-db, libapache2-mod-php5, php5-cgi, php5-pgsql, php5-gd, perl, perl-suid, libdbi-perl, libdbd-pg-perl, debianutils (>= 1.7), debconf (>= 1.0.32) | debconf-2.0, ucf, cronolog, python, ssl-cert, libnusoap-php, php-htmlpurifier (>= 4.0), libphp-simplepie, libjs-yui, libjs-scriptaculous, ${misc:Depends}
 Recommends: libphp-jpgraph, locales | locales-all
 Provides: gforge-web
 Conflicts: gforge-web
@@ -284,7 +284,7 @@
 
 Package: gforge-plugin-mediawiki
 Architecture: all
-Depends: gforge-common (>= 4.8), gforge-db-postgresql (>= 4.8) | gforge-db, gforge-web-apache2 (>= 4.8) | gforge-web, mediawiki (>= 1:1.15~), php5-cli, ${misc:Depends}
+Depends: gforge-common (>= 4.8), gforge-db-postgresql (>= 4.8) | gforge-db, gforge-web-apache2 (>= 4.8) | gforge-web, mediawiki (>= 1:1.15~), php5-cli, php5-gd, ${misc:Depends}
 Description: Mediawiki plugin for FusionForge
  FusionForge provides many tools to aid collaboration in a
  development project, such as bug-tracking, task management,

Modified: trunk/gforge/plugins/mediawiki/packaging/control/160plugin-mediawiki
===================================================================
--- trunk/gforge/plugins/mediawiki/packaging/control/160plugin-mediawiki	2010-05-10 13:19:57 UTC (rev 9706)
+++ trunk/gforge/plugins/mediawiki/packaging/control/160plugin-mediawiki	2010-05-10 13:20:08 UTC (rev 9707)
@@ -1,4 +1,4 @@
 Package: @OLDPACKAGE at -plugin-mediawiki
 Architecture: all
-Depends: @OLDPACKAGE at -common (>= 4.8), @OLDPACKAGE at -db-postgresql (>= 4.8) | @OLDPACKAGE at -db, @OLDPACKAGE at -web-apache2 (>= 4.8) | @OLDPACKAGE at -web, mediawiki (>= 1:1.15~), php5-cli, ${misc:Depends}
+Depends: @OLDPACKAGE at -common (>= 4.8), @OLDPACKAGE at -db-postgresql (>= 4.8) | @OLDPACKAGE at -db, @OLDPACKAGE at -web-apache2 (>= 4.8) | @OLDPACKAGE at -web, mediawiki (>= 1:1.15~), php5-cli, php5-gd, ${misc:Depends}
 Description: Mediawiki plugin for FusionForge

Modified: trunk/gforge/plugins/mediawiki/www/plugin_admin.php
===================================================================
--- trunk/gforge/plugins/mediawiki/www/plugin_admin.php	2010-05-10 13:19:57 UTC (rev 9706)
+++ trunk/gforge/plugins/mediawiki/www/plugin_admin.php	2010-05-10 13:20:08 UTC (rev 9707)
@@ -33,6 +33,13 @@
 	if (!is_file($file_location) || !file_exists($file_location))
 		return _("Invalid file upload");
 
+	$img = getimagesize($file_location);
+	if (!$img || ($img[2] != IMAGETYPE_PNG))
+		return _("Not a valid PNG image");
+	if ($img[0] != 135 || $img[1] != 135)
+		return sprintf(_("Image size is %dx%d pixels, expected %dx%d instead"),
+		    $img[0], $img[1], 135, 135);
+
 	if (!is_writable($wgUploadDirectory))
 		return _("Cannot copy file to target directory");
 




More information about the Fusionforge-commits mailing list