OSDN Git Service

Linked XSS vulnerability
authorkimitake <kimitake@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Mon, 4 Feb 2008 06:11:41 +0000 (06:11 +0000)
committerkimitake <kimitake@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Mon, 4 Feb 2008 06:11:41 +0000 (06:11 +0000)
git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/branches/branch-3-3@361 1ca29b6e-896d-4ea0-84a5-967f57386b96

euc/nucleus/libs/globalfunctions.php
utf8/nucleus/libs/globalfunctions.php

index f51ad2a..1a981a8 100755 (executable)
@@ -13,8 +13,8 @@
 /**
  * @license http://nucleuscms.org/license.txt GNU General Public License
  * @copyright Copyright (C) 2002-2007 The Nucleus Group
- * @version $Id: globalfunctions.php,v 1.13.2.1 2008-01-29 07:05:06 kimitake Exp $
- * $NucleusJP: globalfunctions.php,v 1.23.2.5 2007/12/05 01:28:41 kmorimatsu Exp $
+ * @version $Id: globalfunctions.php,v 1.13.2.2 2008-02-04 06:11:41 kimitake Exp $
+ * $NucleusJP: globalfunctions.php,v 1.23.2.6 2008/02/04 06:10:33 kimitake Exp $
  */
 
 // needed if we include globalfunctions from install.php
@@ -34,7 +34,7 @@ if ($CONF['debug']) {
 
 // Avoid notices
 if (!isset($CONF['Self'])) {
-       $CONF['Self'] = $_SERVER['PHP_SELF'];
+       $CONF['Self'] = htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES);
 }
 
 /*
@@ -784,7 +784,7 @@ function selector() {
 //             if ($blogid && (intval($blogid) != $obj->iblog) ) {
 //                     doError(_ERROR_NOSUCHITEM);
 //             }
-               if ($blogid && (intval($blogid) != $obj->iblog)) {
+               if ($blogid && (intval($blogid) != $obj->iblog) ) {
                        if (!headers_sent()) {
                                $b =& $manager->getBlog($obj->iblog);
                                $CONF['ItemURL'] = $b->getURL();
index 5dd2bb1..6f455be 100755 (executable)
@@ -13,8 +13,8 @@
 /**
  * @license http://nucleuscms.org/license.txt GNU General Public License
  * @copyright Copyright (C) 2002-2007 The Nucleus Group
- * @version $Id: globalfunctions.php,v 1.23.2.5 2007-12-05 01:28:41 kmorimatsu Exp $
- * $NucleusJP: globalfunctions.php,v 1.23.2.4 2007/12/02 23:49:30 kmorimatsu Exp $
+ * @version $Id: globalfunctions.php,v 1.23.2.6 2008-02-04 06:10:33 kimitake Exp $
+ * $NucleusJP: globalfunctions.php,v 1.23.2.5 2007/12/05 01:28:41 kmorimatsu Exp $
  */
 
 // needed if we include globalfunctions from install.php
@@ -34,7 +34,7 @@ if ($CONF['debug']) {
 
 // Avoid notices
 if (!isset($CONF['Self'])) {
-       $CONF['Self'] = $_SERVER['PHP_SELF'];
+       $CONF['Self'] = htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES);
 }
 
 /*
@@ -784,7 +784,7 @@ function selector() {
 //             if ($blogid && (intval($blogid) != $obj->iblog) ) {
 //                     doError(_ERROR_NOSUCHITEM);
 //             }
-               if ($blogid && (intval($blogid) != $obj->iblog)) {
+               if ($blogid && (intval($blogid) != $obj->iblog) ) {
                        if (!headers_sent()) {
                                $b =& $manager->getBlog($obj->iblog);
                                $CONF['ItemURL'] = $b->getURL();