Changeset 1106596
- Timestamp:
- 03/06/2015 05:52:19 AM (11 years ago)
- Location:
- spam-byebye
- Files:
-
- 8 added
- 5 edited
-
tags/2.2.0 (added)
-
tags/2.2.0/config.default.php (added)
-
tags/2.2.0/readme.txt (added)
-
tags/2.2.0/screenshot-1.png (added)
-
tags/2.2.0/setup.js (added)
-
tags/2.2.0/setup.php (added)
-
tags/2.2.0/spam-bye2.php (added)
-
tags/2.2.0/uninstall.php (added)
-
trunk/config.default.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/screenshot-1.png (modified) (previous)
-
trunk/setup.php (modified) (1 diff)
-
trunk/spam-bye2.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
spam-byebye/trunk/config.default.php
r1097942 r1106596 26 26 // 複数指定する場合は「,」で区切る 27 27 define('SB2_URIBL_HOSTS', 'url.rbl.jp,dyndns.rbl.jp,notop.rbl.jp,multi.surbl.org,multi.uribl.com'); 28 29 // ホワイトリスト(メールアドレス) 30 // 複数指定する場合は「,」で区切る 31 define('SB2_WHITE_LISTS', ''); 28 32 29 33 /************************************************** チェック項目設定 *************************************************** -
spam-byebye/trunk/readme.txt
r1097942 r1106596 4 4 Requires at least: 3.0.0 5 5 Tested up to: 4.1.1 6 Stable tag: 2. 1.36 Stable tag: 2.2.0 7 7 License: GPLv2 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 77 77 * 複数のブラックリストデータベースを指定する場合は1件毎に改行を入れてください 78 78 79 ####7.ホワイトリスト(メールアドレス) 80 * このリストのメールアドレスとEmail欄のメールドレスが一致した場合は検査を行いません 81 * 複数のメールアドレスを指定する場合は1件毎に改行を入れてください 82 79 83 ### チェック項目設定 80 84 ####1.優先度 … … 234 238 235 239 == Changelog == 240 = 2.2.0 = 241 * ホワイトリスト機能を追加 242 236 243 = 2.1.3 = 237 244 * DNSBLの初期設定からスパムちゃんぷるーを削除 -
spam-byebye/trunk/setup.php
r632978 r1106596 78 78 </tr> 79 79 <tr style="background-color:#ececec;"> 80 <th rowspan="2" style="border-right:1px solid #dfdfdf; border-bottom:0;">URIBLデータベース</th>80 <th rowspan="2" style="border-right:1px solid #dfdfdf;">URIBLデータベース</th> 81 81 <td style="border-bottom:0;"><textarea name="SB2_URIBL_HOSTS[]" rows="5" cols="70" class="search-input"><?php echo htmlspecialchars($_POST['SB2_URIBL_HOSTS'][0]); ?></textarea></td> 82 82 </tr> 83 83 <tr style="background-color:#ececec;"> 84 <td style="color:red;border-top:0;border-bottom:0;"><?php echo $_POST['SB2_URIBL_HOSTS']['error']; ?></td> 84 <td style="color:red;border-top:0;"><?php echo $_POST['SB2_URIBL_HOSTS']['error']; ?></td> 85 </tr> 86 <tr style="background-color:#f9f9f9;"> 87 <th rowspan="2" style="border-right:1px solid #dfdfdf;border-bottom:0;">ホワイトリスト<br />(メールアドレス)</th> 88 <td style="border-bottom:0;"><textarea name="SB2_WHITE_LISTS[]" rows="5" cols="70" class="search-input"><?php echo htmlspecialchars($_POST['SB2_WHITE_LISTS'][0]); ?></textarea></td> 89 </tr> 90 <tr style="background-color:#f9f9f9;"> 91 <td style="color:red;border-top:0;border-bottom:0;"><?php echo $_POST['SB2_WHITE_LISTS']['error']; ?></td> 85 92 </tr> 86 93 </tbody> -
spam-byebye/trunk/spam-bye2.php
r1097942 r1106596 5 5 Description: コメントスパム対策用プラグイン 6 6 Author: ohtan 7 Version: 2. 1.37 Version: 2.2.0 8 8 Author URI: http://cmf.ohtanz.com/ 9 9 License: GPL2 … … 44 44 $inData['comment_author'], 45 45 $inData['comment_author_url'], 46 $inData['comment_content'] 46 $inData['comment_content'], 47 $inData['comment_author_email'] 47 48 ); 48 49 } … … 118 119 case preg_match("/^SB2_DNSBL_HOSTS$/", $key): 119 120 case preg_match("/^SB2_URIBL_HOSTS$/", $key): 121 case preg_match("/^SB2_WHITE_LISTS$/", $key): 120 122 $line .= "define('${key}', '" . $this->sb2SetupSreplace($val[0]) . "');\n"; 121 123 break; … … 187 189 } 188 190 } 191 foreach (preg_split("/[\s]+/", $_POST['SB2_WHITE_LISTS'][0]) as $val) { 192 if ($val !== "" && !preg_match("/^[0-9A-Za-z._\-]+@[0-9A-Za-z.\-]+$/i", $val)) { 193 $_POST['SB2_WHITE_LISTS']['error'] = "値を正しく入力してください"; 194 $this->error = 1; 195 break; 196 } 197 } 189 198 190 199 foreach ($_POST as $key=>$val) { … … 296 305 $_POST['SB2_DNSBL_HOSTS'][0] = str_replace(",", "\r", SB2_DNSBL_HOSTS); 297 306 $_POST['SB2_URIBL_HOSTS'][0] = str_replace(",", "\r", SB2_URIBL_HOSTS); 307 $_POST['SB2_WHITE_LISTS'][0] = (defined('SB2_WHITE_LISTS') ? str_replace(",", "\r", SB2_WHITE_LISTS) : null); 298 308 $_POST['SB2_ENTRY_OBJECT'][0] = SB2_ENTRY_OBJECT; 299 309 … … 328 338 var $sb2Badpoint = 0; 329 339 330 function spamBye2Check($author,$url,$content) 331 { 340 function spamBye2Check($author, $url, $content, $email) 341 { 342 (array)$white_list = $this->sb2Explode(SB2_WHITE_LISTS, ','); 343 if (in_array($email, $white_list)) return; 344 332 345 if (!function_exists("mb_convert_encoding") || !function_exists("mb_strlen") || !function_exists("mb_detect_encoding")) { 333 346 wp_die('mbstring function is not found');
Note: See TracChangeset
for help on using the changeset viewer.