OSDN Git Service

sync with orginal v3.24
authorkimitake <kimitake@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Mon, 13 Nov 2006 00:36:39 +0000 (00:36 +0000)
committerkimitake <kimitake@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Mon, 13 Nov 2006 00:36:39 +0000 (00:36 +0000)
FIXED: XSS issue (reported by <a href="http://www.jpcert.or.jp/">JPCERT/CC</a>).

git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/trunk@165 1ca29b6e-896d-4ea0-84a5-967f57386b96

utf8/nucleus/documentation/history.html
utf8/nucleus/libs/ACTIONS.php
utf8/nucleus/libs/ADMIN.php
utf8/nucleus/libs/showlist.php

index 7e95eb1..615e4b9 100755 (executable)
@@ -1,8 +1,8 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="ja-JP" xml:lang="ja-JP">
 <head>
-       <!-- $Id: history.html,v 1.6 2006-07-17 20:02:50 kimitake Exp $ -->
-       <!-- $NucleusJP: history.html,v 1.5 2006/07/12 07:11:46 kimitake Exp $ -->
+       <!-- $Id: history.html,v 1.7 2006-11-13 00:36:39 kimitake Exp $ -->
+       <!-- $NucleusJP: history.html,v 1.6 2006/07/17 20:02:50 kimitake Exp $ -->
        <title>Nucleus - History</title>
        <link rel="stylesheet" type="text/css" href="styles/manual.css" />
 </head>
                </ul>
        </li>
        <li>
+               <b>Nucleus v3.24 (November 11, 2006)</b>
+               <ul>
+                       <li>FIXED: XSS issue (reported by <a href="http://www.jpcert.or.jp/">JPCERT/CC</a>).</li>
+               </ul>
+       </li>
+       <li>
                <b>Nucleus v3.23 (May 23, 2006)</b>
                <ul>
                        <li>FIXED: Remote code execution vulnerability (reported by rgod).</li>
index 5fdbdae..12acec2 100644 (file)
@@ -18,8 +18,8 @@
  *
  * @license http://nucleuscms.org/license.txt GNU General Public License
  * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: ACTIONS.php,v 1.2 2006-07-20 08:01:52 kimitake Exp $
- * @version $NucleusJP$
+ * @version $Id: ACTIONS.php,v 1.3 2006-11-13 00:36:39 kimitake Exp $
+ * @version $NucleusJP: ACTIONS.php,v 1.2 2006/07/20 08:01:52 kimitake Exp $
  */
 
 class ACTIONS extends BaseActions {
@@ -778,19 +778,19 @@ class ACTIONS extends BaseActions {
                global $blog;
                switch($which) {
                        case 'id':
-                               echo $blog->getID();
+                               echo htmlspecialchars($blog->getID());
                                break;
                        case 'url':
-                               echo $blog->getURL();
+                               echo htmlspecialchars($blog->getURL());
                                break;
                        case 'name':
-                               echo $blog->getName();
+                               echo htmlspecialchars($blog->getName());
                                break;
                        case 'desc':
-                               echo $blog->getDescription();
+                               echo htmlspecialchars($blog->getDescription());
                                break;
                        case 'short':
-                               echo $blog->getShortName();
+                               echo htmlspecialchars($blog->getShortName());
                                break;
                }
        }
@@ -804,23 +804,23 @@ class ACTIONS extends BaseActions {
 
                        switch($what) {
                                case 'name':
-                                       echo $memberinfo->getDisplayName();
+                                       echo htmlspecialchars($memberinfo->getDisplayName());
                                        break;
                                case 'realname':
-                                       echo $memberinfo->getRealName();
+                                       echo htmlspecialchars($memberinfo->getRealName());
                                        break;
                                case 'notes':
-                                       echo $memberinfo->getNotes();
+                                       echo htmlspecialchars($memberinfo->getNotes());
                                        break;
                                case 'url':
-                                       echo $memberinfo->getURL();
+                                       echo htmlspecialchars($memberinfo->getURL());
                                        break;
                                case 'email':
-                                       echo $memberinfo->getEmail();
+                                       echo htmlspecialchars($memberinfo->getEmail());
                                        break;
                                case 'id':
-                                       echo $memberinfo->getID();
-                                       break;
+                                       echo htmlspecialchars($memberinfo->getID());
+                                       break;                                  
                        }
                }
 
index c0dbc93..429afbe 100755 (executable)
@@ -14,8 +14,8 @@
  *
  * @license http://nucleuscms.org/license.txt GNU General Public License
  * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: ADMIN.php,v 1.9 2006-08-31 20:58:00 kimitake Exp $
- * @version $NucleusJP: ADMIN.php,v 1.8 2006/07/12 09:18:02 kimitake Exp $
+ * @version $Id: ADMIN.php,v 1.10 2006-11-13 00:36:39 kimitake Exp $
+ * @version $NucleusJP: ADMIN.php,v 1.9 2006/08/31 20:58:00 kimitake Exp $
  */
 
 require_once "showlist.php";
@@ -1863,12 +1863,12 @@ class ADMIN {
                // check if allowed
                ($member->getID() == $memberid) or $member->isAdmin() or $this->disallow();
 
-               $name                   = trim(postVar('name'));
-               $realname               = trim(postVar('realname'));
+               $name                   = trim(strip_tags(postVar('name')));
+               $realname               = trim(strip_tags(postVar('realname')));
                $password               = postVar('password');
                $repeatpassword = postVar('repeatpassword');
-               $email                  = postVar('email');
-               $url                    = postVar('url');
+               $email                  = strip_tags(postVar('email'));
+               $url                    = strip_tags(postVar('url'));
 
                // Sometimes user didn't prefix the URL with http://, this cause a malformed URL. Let's fix it.
                if (!eregi("^https?://", $url))
@@ -1876,7 +1876,7 @@ class ADMIN {
 
                $admin                  = postVar('admin');
                $canlogin               = postVar('canlogin');
-               $notes                  = postVar('notes');
+               $notes                  = strip_tags(postVar('notes'));
                $deflang                = postVar('deflang');
 
                $mem = MEMBER::createFromID($memberid);
@@ -1923,9 +1923,6 @@ class ADMIN {
                                $mem->setPassword($password);
                }
 
-               if ($newpass)
-                       $mem->setPassword($password);
-
                $oldEmail = $mem->getEmail();
 
                $mem->setRealName($realname);
@@ -1965,7 +1962,7 @@ class ADMIN {
 
 
                if (  ( $mem->getID() == $member->getID() )
-                  && ( $newpass || ( $mem->getDisplayName() != $member->getDisplayName() ) )
+                  && ( $mem->getDisplayName() != $member->getDisplayName() )
                   ) {
                        $mem->newCookieKey();
                        $member->logout();
@@ -5009,7 +5006,7 @@ selector();
                        <?php           }
                ?>
                        <div class="foot">
-                               <a href="http://nucleuscms.org/">Nucleus CMS</a> &copy; 2002-2006 The Nucleus Group
+                               <a href="http://nucleuscms.org/">Nucleus CMS</a> &copy; 2002-<?php echo date('Y'); ?> The Nucleus Group
                                -
                                <a href="http://nucleuscms.org/donate.php">Donate!</a>
                        </div>
index ca4edea..b8760f9 100644 (file)
@@ -14,8 +14,8 @@
  *
  * @license http://nucleuscms.org/license.txt GNU General Public License
  * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: showlist.php,v 1.3 2006-07-20 08:01:52 kimitake Exp $
- * @version $NucleusJP$
+ * @version $Id: showlist.php,v 1.4 2006-11-13 00:36:39 kimitake Exp $
+ * @version $NucleusJP: showlist.php,v 1.3 2006/07/20 08:01:52 kimitake Exp $
  */
 
 
@@ -130,7 +130,7 @@ function listplug_table_memberlist($template, $type) {
                        echo '</label>';
                        echo '</td>';
                        echo '<td>', htmlspecialchars($current->mrealname), '</td>';
-                       echo "<td><a href='$current->murl' tabindex='".$template['tabindex']."'>$current->murl</a></td>";
+                       echo "<td><a href='", htmlspecialchars($current->murl), "' tabindex='", $template['tabindex'] , "'>", htmlspecialchars($current->murl), "</a></td>";
                        echo '<td>', ($current->madmin ? _YES : _NO),'</td>';
                        echo '<td>', ($current->mcanlogin ? _YES : _NO), '</td>';
                        echo "<td><a href='index.php?action=memberedit&amp;memberid=$current->mnumber' tabindex='".$template['tabindex']."'>"._LISTS_EDIT."</a></td>";