[xoops-cvslog 4497] CVS update: xoops2jp/html/modules/base/preload

Back to archive index

Minahito minah****@users*****
2006年 9月 14日 (木) 15:06:13 JST


Index: xoops2jp/html/modules/base/preload/IPbanningFilter.class.php
diff -u xoops2jp/html/modules/base/preload/IPbanningFilter.class.php:1.1.2.1 xoops2jp/html/modules/base/preload/IPbanningFilter.class.php:1.1.2.2
--- xoops2jp/html/modules/base/preload/IPbanningFilter.class.php:1.1.2.1	Thu Jun 22 14:56:22 2006
+++ xoops2jp/html/modules/base/preload/IPbanningFilter.class.php	Thu Sep 14 15:06:13 2006
@@ -1,16 +1,25 @@
 <?php
+/**
+ * @package Legacy
+ * @version $Id: IPbanningFilter.class.php,v 1.1.2.2 2006/09/14 06:06:13 minahito Exp $
+ */
 
 if (!defined('XOOPS_ROOT_PATH')) exit();
 
+/**
+ * This burns the access from the specific IP address, which is specified at
+ * the preference.
+ */
 class Base_IPbanningFilter extends XCube_ActionFilter
 {
 	function preBlockFilter()
 	{
 		if ($this->mController->mConfig['enable_badips']) {
-			if(isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR']) {
+			if (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR']) {
 				foreach ($this->mController->mConfig['bad_ips'] as $bi) {
-					if(strstr($_SERVER['REMOTE_ADDR'],$bi)!==false)
+					if(!empty($bi) && strstr($_SERVER['REMOTE_ADDR'], $bi)!==false) {
 						die();
+					}
 				}
 			}
 		}


xoops-cvslog メーリングリストの案内
Back to archive index