From aa99a97f0fbc98fc57217703d30f8fdc6bbf14ad Mon Sep 17 00:00:00 2001 From: kmorimatsu Date: Tue, 30 Oct 2007 18:47:03 +0000 Subject: [PATCH] Remove $_COOKIE from $_REQUEST git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/trunk@347 1ca29b6e-896d-4ea0-84a5-967f57386b96 --- utf8/nucleus/libs/vars4.1.0.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/utf8/nucleus/libs/vars4.1.0.php b/utf8/nucleus/libs/vars4.1.0.php index 84a4917..42f5814 100755 --- a/utf8/nucleus/libs/vars4.1.0.php +++ b/utf8/nucleus/libs/vars4.1.0.php @@ -13,10 +13,20 @@ /** * @license http://nucleuscms.org/license.txt GNU General Public License * @copyright Copyright (C) 2002-2007 The Nucleus Group - * @version $Id: vars4.1.0.php,v 1.10 2007-02-04 06:28:46 kimitake Exp $ - * @version $NucleusJP: vars4.1.0.php,v 1.9 2006/12/18 20:31:08 kmorimatsu Exp $ + * @version $Id: vars4.1.0.php,v 1.11 2007-10-30 18:47:03 kmorimatsu Exp $ + * @version $NucleusJP: vars4.1.0.php,v 1.10 2007/02/04 06:28:46 kimitake Exp $ */ + +// Remove $_COOKIE keys in $_REQUEST +// This is for maintaining the compatibility with PHP 4.0.6 +// and also for avoiding bugs of plugins due to cookie keys +if (isset($_REQUEST) and isset($_COOKIE)) { + foreach($_COOKIE as $key=>$value) { + if (isset($_REQUEST[$key])) unset($_REQUEST[$key]); + } +} + function getVar($name) { if (!isset($_GET[$name])) { return; -- 2.11.0