aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclsung <clsung@FreeBSD.org>2006-09-30 13:36:26 +0800
committerclsung <clsung@FreeBSD.org>2006-09-30 13:36:26 +0800
commit51cc99f59207904c06476ca02e08935f21964066 (patch)
tree89446a5f4312d0fb67b22e2dcb99cbace159283a
parenta79ab719832cbc0a9f63ba39fe04798917e4ff25 (diff)
downloadfreebsd-ports-gnome-51cc99f59207904c06476ca02e08935f21964066.tar.gz
freebsd-ports-gnome-51cc99f59207904c06476ca02e08935f21964066.tar.zst
freebsd-ports-gnome-51cc99f59207904c06476ca02e08935f21964066.zip
- Fix security issue(Image resize DOS-Attack in fetch.php)
- bump PORTREVISION PR: ports/103798 Security: http://bugs.splitbrain.org/?do=details&id=924
-rw-r--r--www/dokuwiki/Makefile5
-rw-r--r--www/dokuwiki/files/patch-lib-exe-fetch.php24
2 files changed, 28 insertions, 1 deletions
diff --git a/www/dokuwiki/Makefile b/www/dokuwiki/Makefile
index c4439fdba0ed..70c49d7acc26 100644
--- a/www/dokuwiki/Makefile
+++ b/www/dokuwiki/Makefile
@@ -7,7 +7,7 @@
PORTNAME= dokuwiki
PORTVERSION= ${DIST_VER:S/${PORTNAME}//:S/-//g}
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= www
MASTER_SITES= http://www.splitbrain.org/_media/projects/dokuwiki/ \
http://dev.splitbrain.org/browse/snapshots/
@@ -84,6 +84,9 @@ pre-patch:
@${FIND} ${WRKSRC}/conf -name "*.php.bak" -delete
.endif
+post-patch:
+ @${FIND} ${WRKSRC}/lib/exe -name "*.orig" -delete
+
pre-install:
@${TOUCH} ${WRKSRC}/data/changes.log
diff --git a/www/dokuwiki/files/patch-lib-exe-fetch.php b/www/dokuwiki/files/patch-lib-exe-fetch.php
new file mode 100644
index 000000000000..6210e59c9ea3
--- /dev/null
+++ b/www/dokuwiki/files/patch-lib-exe-fetch.php
@@ -0,0 +1,24 @@
+--- lib/exe/fetch.php.bak Fri Mar 10 04:32:34 2006
++++ lib/exe/fetch.php Fri Sep 29 12:54:09 2006
+@@ -21,8 +21,8 @@
+ //get input
+ $MEDIA = getID('media',false); // no cleaning - maybe external
+ $CACHE = calc_cache($_REQUEST['cache']);
+- $WIDTH = $_REQUEST['w'];
+- $HEIGHT = $_REQUEST['h'];
++ $WIDTH = (int) $_REQUEST['w'];
++ $HEIGHT = (int) $_REQUEST['h'];
+ list($EXT,$MIME) = mimetype($MEDIA);
+ if($EXT === false){
+ $EXT = 'unknown';
+@@ -198,6 +198,10 @@
+ $info = getimagesize($file);
+ if(!$h) $h = round(($w * $info[1]) / $info[0]);
+
++ /*
++ * This is the fix for http://bugs.splitbrain.org/?do=details&id=924
++ */
++ if($w > 2000 || $h > 2000) return $file;
+
+ //cache
+ $local = getCacheName($file,'.media.'.$w.'x'.$h.'.'.$ext);