OSDN Git Service

Secure cookie key
authorkmorimatsu <kmorimatsu@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Fri, 6 Apr 2007 22:08:56 +0000 (22:08 +0000)
committerkmorimatsu <kmorimatsu@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Fri, 6 Apr 2007 22:08:56 +0000 (22:08 +0000)
git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/trunk@251 1ca29b6e-896d-4ea0-84a5-967f57386b96

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

index 1ab48ee..9ea246d 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.11 2007-04-06 21:25:58 kmorimatsu Exp $
- * $NucleusJP: globalfunctions.php,v 1.10 2007/04/04 21:00:14 kmorimatsu Exp $
+ * @version $Id: globalfunctions.php,v 1.12 2007-04-06 22:08:56 kmorimatsu Exp $
+ * $NucleusJP: globalfunctions.php,v 1.11 2007/04/06 21:25:58 kmorimatsu Exp $
  */
 
 // needed if we include globalfunctions from install.php
@@ -175,13 +175,13 @@ $member = new MEMBER();
 if (!isset($CONF['secureCookieKey'])) $CONF['secureCookieKey']=24;
 switch($CONF['secureCookieKey']){
 case 8:
-       $CONF['secureCookieKeyIP']=preg_replace('/\.[0-9]?\.[0-9]?\.[0-9]?$/','',serverVar('REMOTE_ADDR'));
+       $CONF['secureCookieKeyIP']=preg_replace('/\.[0-9]+\.[0-9]+\.[0-9]+$/','',serverVar('REMOTE_ADDR'));
        break;
 case 16:
-       $CONF['secureCookieKeyIP']=preg_replace('/\.[0-9]?\.[0-9]?$/','',serverVar('REMOTE_ADDR'));
+       $CONF['secureCookieKeyIP']=preg_replace('/\.[0-9]+\.[0-9]+$/','',serverVar('REMOTE_ADDR'));
        break;
 case 24:
-       $CONF['secureCookieKeyIP']=preg_replace('/\.[0-9]?$/','',serverVar('REMOTE_ADDR'));
+       $CONF['secureCookieKeyIP']=preg_replace('/\.[0-9]+$/','',serverVar('REMOTE_ADDR'));
        break;
 case 32:
        $CONF['secureCookieKeyIP']=serverVar('REMOTE_ADDR');
index c16b7ac..4b8f2eb 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.21 2007-04-06 21:25:30 kmorimatsu Exp $
- * $NucleusJP: globalfunctions.php,v 1.20 2007/04/04 20:59:34 kmorimatsu Exp $
+ * @version $Id: globalfunctions.php,v 1.22 2007-04-06 22:08:39 kmorimatsu Exp $
+ * $NucleusJP: globalfunctions.php,v 1.21 2007/04/06 21:25:30 kmorimatsu Exp $
  */
 
 // needed if we include globalfunctions from install.php
@@ -175,13 +175,13 @@ $member = new MEMBER();
 if (!isset($CONF['secureCookieKey'])) $CONF['secureCookieKey']=24;
 switch($CONF['secureCookieKey']){
 case 8:
-       $CONF['secureCookieKeyIP']=preg_replace('/\.[0-9]?\.[0-9]?\.[0-9]?$/','',serverVar('REMOTE_ADDR'));
+       $CONF['secureCookieKeyIP']=preg_replace('/\.[0-9]+\.[0-9]+\.[0-9]+$/','',serverVar('REMOTE_ADDR'));
        break;
 case 16:
-       $CONF['secureCookieKeyIP']=preg_replace('/\.[0-9]?\.[0-9]?$/','',serverVar('REMOTE_ADDR'));
+       $CONF['secureCookieKeyIP']=preg_replace('/\.[0-9]+\.[0-9]+$/','',serverVar('REMOTE_ADDR'));
        break;
 case 24:
-       $CONF['secureCookieKeyIP']=preg_replace('/\.[0-9]?$/','',serverVar('REMOTE_ADDR'));
+       $CONF['secureCookieKeyIP']=preg_replace('/\.[0-9]+$/','',serverVar('REMOTE_ADDR'));
        break;
 case 32:
        $CONF['secureCookieKeyIP']=serverVar('REMOTE_ADDR');