From 3e562f5531b9b47c76d5492dce034759b2490402 Mon Sep 17 00:00:00 2001 From: taca Date: Thu, 6 Jan 2011 14:23:41 +0000 Subject: Add the same patch of Comment module as Contao 2.9.3. Changes are derived from Conao's repository. Bump PKGREVISION. --- www/typolight28/Makefile | 4 ++-- www/typolight28/distinfo | 4 +++- www/typolight28/patches/patch-ae | 19 +++++++++++++++++++ www/typolight28/patches/patch-af | 15 +++++++++++++++ 4 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 www/typolight28/patches/patch-ae create mode 100644 www/typolight28/patches/patch-af (limited to 'www') diff --git a/www/typolight28/Makefile b/www/typolight28/Makefile index dec94251fe4..02933ff4c17 100644 --- a/www/typolight28/Makefile +++ b/www/typolight28/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.11 2010/07/28 16:24:20 taca Exp $ +# $NetBSD: Makefile,v 1.12 2011/01/06 14:23:41 taca Exp $ # DISTNAME= typolight-${TL_VERSION} PKGNAME= typolight${TL_VER}-${TL_PKGVER} -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=typolight/} diff --git a/www/typolight28/distinfo b/www/typolight28/distinfo index 9db47f75de3..227f98d2675 100644 --- a/www/typolight28/distinfo +++ b/www/typolight28/distinfo @@ -1,6 +1,8 @@ -$NetBSD: distinfo,v 1.9 2010/07/28 16:24:20 taca Exp $ +$NetBSD: distinfo,v 1.10 2011/01/06 14:23:41 taca Exp $ SHA1 (typolight-2.8.4.tar.gz) = d18d684a06f5dd29ffc6a28d08143feb613cd47b RMD160 (typolight-2.8.4.tar.gz) = ad82d00e3b7ec4e604640779fec841fcfc65f75c Size (typolight-2.8.4.tar.gz) = 4097946 bytes SHA1 (patch-ad) = 207ce919bb6fa7148108f8bd075d3a7d7ad1eeb9 +SHA1 (patch-ae) = eed6db905809b3782acb8324799de6bc8d4e855b +SHA1 (patch-af) = 868309cff4ba1855a96745c578737878f8d118d5 diff --git a/www/typolight28/patches/patch-ae b/www/typolight28/patches/patch-ae new file mode 100644 index 00000000000..02ed3a7905f --- /dev/null +++ b/www/typolight28/patches/patch-ae @@ -0,0 +1,19 @@ +$NetBSD: patch-ae,v 1.1 2011/01/06 14:23:41 taca Exp $ + +* Prevent the X_FORWARDED_FOR header against XSS attacks, from repository r587. + +--- system/libraries/Environment.php.orig 2010-04-12 15:52:19.000000000 +0000 ++++ system/libraries/Environment.php +@@ -312,7 +312,11 @@ class Environment + */ + protected function ip() + { +- return !empty($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; ++ if (!empty($_SERVER['HTTP_X_FORWARDED_FOR']) && preg_match('/^[A-Fa-f0-9, \.\:]+$/', $_SERVER['HTTP_X_FORWARDED_FOR'])) ++ { ++ return $_SERVER['HTTP_X_FORWARDED_FOR']; ++ } ++ return $_SERVER['REMOTE_ADDR']; + } + + diff --git a/www/typolight28/patches/patch-af b/www/typolight28/patches/patch-af new file mode 100644 index 00000000000..071192c36c3 --- /dev/null +++ b/www/typolight28/patches/patch-af @@ -0,0 +1,15 @@ +$NetBSD: patch-af,v 1.1 2011/01/06 14:23:41 taca Exp $ + +* Prevent the X_FORWARDED_FOR header against XSS attacks, from repository r587. + +--- system/modules/comments/dca/tl_comments.php.orig 2010-04-08 15:11:44.000000000 +0000 ++++ system/modules/comments/dca/tl_comments.php +@@ -469,7 +469,7 @@ class tl_comments extends Backend + + return ' +
+-
' . $arrRow['name'] . '' . (strlen($arrRow['website']) ? ' (' . $GLOBALS['TL_LANG']['MSC']['com_website'] . ')' : '') . ' - ' . $this->parseDate($GLOBALS['TL_CONFIG']['datimFormat'], $arrRow['date']) . ' - IP ' . $arrRow['ip'] . '
' . $title . '
++
' . $arrRow['name'] . '' . (strlen($arrRow['website']) ? ' (' . $GLOBALS['TL_LANG']['MSC']['com_website'] . ')' : '') . ' - ' . $this->parseDate($GLOBALS['TL_CONFIG']['datimFormat'], $arrRow['date']) . ' - IP ' . specialchars($arrRow['ip']) . '
' . $title . '
+
+ ' . $arrRow['comment'] . ' +
-- cgit v1.2.3