OSDN Git Service

Expire risk: unset $_GET, $_POST, $_COOKIE
authorhenoheno <henoheno>
Wed, 30 Jun 2004 13:36:45 +0000 (22:36 +0900)
committerhenoheno <henoheno>
Wed, 30 Jun 2004 13:36:45 +0000 (22:36 +0900)
init.php

index 8363fbe..4c521e3 100644 (file)
--- a/init.php
+++ b/init.php
@@ -2,7 +2,7 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: init.php,v 1.78 2004/06/28 12:07:21 henoheno Exp $
+// $Id: init.php,v 1.79 2004/06/30 13:36:45 henoheno Exp $
 //
 
 /////////////////////////////////////////////////
@@ -145,6 +145,9 @@ $get    = sanitize($_GET);
 $post   = sanitize($_POST);
 $cookie = sanitize($_COOKIE);
 
+// Expire risk
+unset($_GET, $_POST, $_COOKIE);        //, 'SERVER', 'ENV', 'REQUEST', 'SESSION', ...
+
 /////////////////////////////////////////////////
 // Ê¸»ú¥³¡¼¥É¤òÊÑ´¹
 
@@ -241,7 +244,7 @@ if (array_key_exists('page', $vars)) {
 }
 
 // À°·Á: msg, ²þ¹Ô¤ò¼è¤ê½ü¤¯
-if (!empty($vars['msg']))  {
+if (isset($vars['msg'])) {
        $get['msg'] = $post['msg'] = $vars['msg'] = str_replace("\r",'',$vars['msg']);
 }