Throws SPAM Away - Version 2.6.9

Version Description

= 2.0 = IP IP

= 1.4 =

NG

= 1.3 =

= 1.2.1 =

= 1.2 = 1

= 1.1 =

= 1.0 =

Download this release

Release Info

Developer tsato
Plugin Icon wp plugin Throws SPAM Away
Version 2.6.9
Comparing to
See all releases

Code changes from version 2.6.8 to 2.6.9

js/tsa_params.js CHANGED
@@ -1,15 +1,15 @@
1
  /**
2
  * <p>ThrowsSpamAway</p> JavaScript
3
  * WordPress's Plugin
4
- * @author Takeshi Satoh@GTI Inc. 2014
5
  * @since version2.6
6
  *
7
  * -- updated --
8
  * 2014/05/10 debug for IE8
 
9
  */
10
 
11
  jQuery(function(){
12
- jQuery('.tsa_param_field_tsa_2').hide(); // hide
13
  jQuery('.tsa_param_field_tsa_2 input#tsa_param_field_tsa_3').val( jQuery('.tsa_param_field_tsa_ input').val() ); // copy
14
 
15
  var date = new Date();
1
  /**
2
  * <p>ThrowsSpamAway</p> JavaScript
3
  * WordPress's Plugin
4
+ * @author Takeshi Satoh@GTI Inc. 2015
5
  * @since version2.6
6
  *
7
  * -- updated --
8
  * 2014/05/10 debug for IE8
9
+ * 2015/07/25 �C�����C���X�^�C����display:none�w�肵������ hide�폜
10
  */
11
 
12
  jQuery(function(){
 
13
  jQuery('.tsa_param_field_tsa_2 input#tsa_param_field_tsa_3').val( jQuery('.tsa_param_field_tsa_ input').val() ); // copy
14
 
15
  var date = new Date();
js/tsa_params.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(){jQuery(".tsa_param_field_tsa_2").hide();jQuery(".tsa_param_field_tsa_2 input#tsa_param_field_tsa_3").val(jQuery(".tsa_param_field_tsa_ input").val());var a=new Date();var b=null;if(typeof a.toISOString!="undefined"){b=a.toISOString().match(/(\d{4}\-\d{2}\-\d{2})T(\d{2}:\d{2}:\d{2})/);current_date=b[1]+" "+b[2];if(jQuery("#comments form input#tsa_param_field_tsa_3").length==0){jQuery("#comments form").append('<input type="hidden" name="tsa_param_field_tsa_3" id="tsa_param_field_tsa_3" value="'+current_date+'" />')}if(jQuery("#respond form input#tsa_param_field_tsa_3").length==0){jQuery("#respond form").append('<input type="hidden" name="tsa_param_field_tsa_3" id="tsa_param_field_tsa_3" value="'+current_date+'" />')}if(jQuery("form#commentform input#tsa_param_field_tsa_3").length==0){jQuery("form#commentform").append('<input type="hidden" name="tsa_param_field_tsa_3" id="tsa_param_field_tsa_3" value="'+current_date+'" />')}}});
1
+ jQuery(function(){jQuery(".tsa_param_field_tsa_2 input#tsa_param_field_tsa_3").val(jQuery(".tsa_param_field_tsa_ input").val());var a=new Date();var b=null;if(typeof a.toISOString!="undefined"){b=a.toISOString().match(/(\d{4}\-\d{2}\-\d{2})T(\d{2}:\d{2}:\d{2})/);current_date=b[1]+" "+b[2];if(jQuery("#comments form input#tsa_param_field_tsa_3").length==0){jQuery("#comments form").append('<input type="hidden" name="tsa_param_field_tsa_3" id="tsa_param_field_tsa_3" value="'+current_date+'" />')}if(jQuery("#respond form input#tsa_param_field_tsa_3").length==0){jQuery("#respond form").append('<input type="hidden" name="tsa_param_field_tsa_3" id="tsa_param_field_tsa_3" value="'+current_date+'" />')}if(jQuery("form#commentform input#tsa_param_field_tsa_3").length==0){jQuery("form#commentform").append('<input type="hidden" name="tsa_param_field_tsa_3" id="tsa_param_field_tsa_3" value="'+current_date+'" />')}}});
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: tsato
3
  Donate link: http://gti.jp/throws-spam-away
4
  Tags: comments, spam
5
  Requires at least: 3.1
6
- Tested up to: 4.2.2
7
- Stable tag: 2.6.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -82,6 +82,13 @@ IPアドレスの指定「ブロックリスト」「ホワイトリスト」共
82
  ※コメント投稿時のスパムコメント対応の煩わしさが原因で作ったものですのでスパム判定されたコメントを保持しておりません。
83
 
84
  -- これまでの変更点について
 
 
 
 
 
 
 
85
  ・バージョン2.6.8
86
   2015/5/12
87
   スパム排除が目的なのにスパムが溜まる矛盾を解決すべく「スパムデータベースへの保存」を デフォルト OFF にしました。
3
  Donate link: http://gti.jp/throws-spam-away
4
  Tags: comments, spam
5
  Requires at least: 3.1
6
+ Tested up to: 4.2.3
7
+ Stable tag: 2.6.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
82
  ※コメント投稿時のスパムコメント対応の煩わしさが原因で作ったものですのでスパム判定されたコメントを保持しておりません。
83
 
84
  -- これまでの変更点について
85
+
86
+ ・バージョン2.6.9
87
+  2015/7/25
88
+  すぱむちゃんぷるーの代替スパムフィルタが判定の不具合となる危険性がありましたので一度機能削除しました。
89
+  テキストでリストを記述されている場合はそのまま稼働します。
90
+  ダミー項目機能において一部テーマで隠しフィールドが表示されてしまう不具合報告がありましたので修正しました。
91
+
92
  ・バージョン2.6.8
93
   2015/5/12
94
   スパム排除が目的なのにスパムが溜まる矛盾を解決すべく「スパムデータベースへの保存」を デフォルト OFF にしました。
throws_spam_away.class.php CHANGED
@@ -4,7 +4,7 @@
4
  * <p>ThrowsSpamAway</p> Class
5
  * WordPress's Plugin
6
  * @author Takeshi Satoh@GTI Inc. 2015
7
- * @version 2.6.8
8
  */
9
  class ThrowsSpamAway {
10
 
@@ -61,7 +61,8 @@ class ThrowsSpamAway {
61
  global $default_caution_msg_point, $default_error_msg, $default_url_count_check_flg;
62
  global $default_ok_url_count, $default_url_count_over_error_msg, $default_ng_key_error_msg;
63
  global $default_must_key_error_msg, $default_tb_on_flg, $default_tb_url_flg;
64
- global $default_spam_champuru_hosts, $default_spam_champuru_by_text, $default_spam_champuru_flg;
 
65
  global $default_ip_block_from_spam_chk_flg, $default_block_ip_address_error_msg, $default_spam_data_save;
66
  global $default_spam_data_delete_flg, $default_spam_keep_day_count, $lower_spam_keep_day_count;
67
  global $default_spam_limit_flg, $default_spam_limit_minutes, $default_spam_limit_count;
@@ -83,7 +84,7 @@ class ThrowsSpamAway {
83
  update_option( 'tsa_must_key_error_message', $default_must_key_error_msg );
84
  update_option( 'tsa_tb_on_flg', $default_tb_on_flg );
85
  update_option( 'tsa_tb_url_flg', $default_tb_url_flg );
86
- update_option( 'tsa_spam_champuru_hosts', $default_spam_champuru_hosts );
87
  update_option( 'tsa_spam_champuru_by_text', $default_spam_champuru_by_text );
88
  update_option( 'tsa_spam_champuru_flg', $default_spam_champuru_flg );
89
  update_option( 'tsa_ip_block_from_spam_chk_flg', $default_ip_block_from_spam_chk_flg );
@@ -217,7 +218,7 @@ class ThrowsSpamAway {
217
  if ( $dummy_param_field_flg == '1' ) {
218
  echo '<p class="tsa_param_field_tsa_" style="display:none;">email confirm<span class="required">*</span><input type="text" name="tsa_email_param_field___" id="tsa_email_param_field___" size="30" value="" />
219
  </p>';
220
- echo '<p class="tsa_param_field_tsa_2">post date<span class="required">*</span><input type="text" name="tsa_param_field_tsa_3" id="tsa_param_field_tsa_3" size="30" value="'.date( 'Y-m-d H:i:s' ).'" />
221
  </p>';
222
  }
223
  }
@@ -379,14 +380,14 @@ class ThrowsSpamAway {
379
  function reject_spam_ip( $ip ) {
380
 
381
  // スパムブラックリスト [tsa_spam_champuru_hosts] 配列型
382
- global $default_spam_champuru_hosts;
383
  // スパムブラックリスト by テキスト [tsa_spam_chmapuru_by_text] 文字列型(カンマ区切り)
384
  global $default_spam_champuru_by_text;
385
 
386
  global $error_type;
387
 
388
 
389
- $spam_blacklist_hosts = get_option( 'tsa_spam_champuru_hosts', $default_spam_champuru_hosts );
390
  $spam_blacklist_by_text = get_option( 'tsa_spam_champuru_by_text', $default_spam_champuru_by_text);
391
 
392
  $spam_blacklist_by_text_lists = explode( ',', $spam_blacklist_by_text );
@@ -396,9 +397,13 @@ class ThrowsSpamAway {
396
  }
397
  }
398
 
 
 
 
 
399
  global $default_spam_champuru_by_text;
400
 
401
- $check_list = array_merge($spam_blacklist_hosts, $spam_blacklist_by_text_lists);
402
 
403
  $spam_def_ip = '127.0.0.2';
404
  $pattern = '/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/';
@@ -678,7 +683,7 @@ class ThrowsSpamAway {
678
  global $default_ok_url_count;
679
  global $default_spam_champuru_flg;
680
 
681
- global $default_spam_champuru_hosts;
682
  global $default_spam_champuru_by_text;
683
 
684
  global $default_spam_limit_flg;
@@ -732,7 +737,7 @@ class ThrowsSpamAway {
732
  update_option( 'tsa_dummy_param_field_flg', $_POST['tsa_dummy_param_field_flg'] );
733
  update_option( 'tsa_memo', $_POST['tsa_memo'] );
734
  update_option( 'tsa_spam_champuru_by_text', $_POST['tsa_spam_champuru_by_text'] );
735
- update_option( 'tsa_spam_champuru_hosts', ( isset( $_POST['tsa_spam_champuru_hosts'] ) ? $_POST['tsa_spam_champuru_hosts'] : NULL ) );
736
 
737
  // スパムデータベース作成
738
  $this->tsa_create_tbl();
@@ -1033,22 +1038,8 @@ function addIpAddresses(newAddressStr) {
1033
  </tr>
1034
  <tr>
1035
  <td>
1036
- <h4>下記の2つのリストはマージされて利用します。※多ければ多いほどトラッフィク量が上がりますので注意してください。</h4>
1037
- <strong>【利用するスパムブラックリストサービス】</strong><br />
1038
- <ul>
1039
- <?php
1040
- $spam_hosts = get_option( 'tsa_spam_champuru_hosts', $default_spam_champuru_hosts );
1041
 
1042
- foreach ( $spam_champuru_hosts as $check_host ) { ?>
1043
- <li><input type="checkbox" name="tsa_spam_champuru_hosts[]" value="<?php echo $check_host; ?>"<?php
1044
- if ( in_array( $check_host, $spam_hosts ) ) { ?> checked="checked"<?php } ?>><?php echo $check_host; ?></li>
1045
- <?php } ?>
1046
- </ul>
1047
- </td>
1048
- </tr>
1049
-
1050
- <tr>
1051
- <td>
1052
  <strong>【利用するスパムブラックリストサービスをテキスト入力(カンマ区切り)】</strong><br />
1053
  <input type="text" name="tsa_spam_champuru_by_text"
1054
  size="80"
@@ -1197,7 +1188,7 @@ function addIpAddresses(newAddressStr) {
1197
  <?php /**
1198
  <input
1199
  type="hidden" name="page_options"
1200
- value="tsa_on_flg,tsa_japanese_string_min_count,tsa_back_second,tsa_caution_message,tsa_caution_msg_point,tsa_error_message,tsa_ng_keywords,tsa_ng_key_error_message,tsa_must_keywords,tsa_must_key_error_message,tsa_tb_on_flg,tsa_tb_url_flg,tsa_block_ip_addresses,tsa_ip_block_from_spam_chk_flg,tsa_block_ip_address_error_message,tsa_url_count_on_flg,tsa_ok_url_count,tsa_url_count_over_error_message,tsa_spam_data_save,tsa_spam_limit_flg,tsa_spam_limit_minutes,tsa_spam_limit_count,tsa_spam_limit_over_interval,tsa_spam_limit_over_interval_error_message,tsa_spam_champuru_flg,tsa_spam_keep_day_count,tsa_spam_data_delete_flg,tsa_white_ip_addresses,tsa_dummy_param_field_flg,tsa_memo,tsa_spam_champuru_by_text,tsa_spam_champuru_hosts" />
1201
  */ ?>
1202
  <p class="submit" id="tsa_submit_button">
1203
  <input type="submit" class="button-primary"
4
  * <p>ThrowsSpamAway</p> Class
5
  * WordPress's Plugin
6
  * @author Takeshi Satoh@GTI Inc. 2015
7
+ * @version 2.6.9
8
  */
9
  class ThrowsSpamAway {
10
 
61
  global $default_caution_msg_point, $default_error_msg, $default_url_count_check_flg;
62
  global $default_ok_url_count, $default_url_count_over_error_msg, $default_ng_key_error_msg;
63
  global $default_must_key_error_msg, $default_tb_on_flg, $default_tb_url_flg;
64
+ //global $default_spam_champuru_hosts,
65
+ global $default_spam_champuru_by_text, $default_spam_champuru_flg;
66
  global $default_ip_block_from_spam_chk_flg, $default_block_ip_address_error_msg, $default_spam_data_save;
67
  global $default_spam_data_delete_flg, $default_spam_keep_day_count, $lower_spam_keep_day_count;
68
  global $default_spam_limit_flg, $default_spam_limit_minutes, $default_spam_limit_count;
84
  update_option( 'tsa_must_key_error_message', $default_must_key_error_msg );
85
  update_option( 'tsa_tb_on_flg', $default_tb_on_flg );
86
  update_option( 'tsa_tb_url_flg', $default_tb_url_flg );
87
+ delete_option( 'tsa_spam_champuru_hosts');
88
  update_option( 'tsa_spam_champuru_by_text', $default_spam_champuru_by_text );
89
  update_option( 'tsa_spam_champuru_flg', $default_spam_champuru_flg );
90
  update_option( 'tsa_ip_block_from_spam_chk_flg', $default_ip_block_from_spam_chk_flg );
218
  if ( $dummy_param_field_flg == '1' ) {
219
  echo '<p class="tsa_param_field_tsa_" style="display:none;">email confirm<span class="required">*</span><input type="text" name="tsa_email_param_field___" id="tsa_email_param_field___" size="30" value="" />
220
  </p>';
221
+ echo '<p class="tsa_param_field_tsa_2" style="display:none;">post date<span class="required">*</span><input type="text" name="tsa_param_field_tsa_3" id="tsa_param_field_tsa_3" size="30" value="'.date( 'Y-m-d H:i:s' ).'" />
222
  </p>';
223
  }
224
  }
380
  function reject_spam_ip( $ip ) {
381
 
382
  // スパムブラックリスト [tsa_spam_champuru_hosts] 配列型
383
+ // global $default_spam_champuru_hosts;
384
  // スパムブラックリスト by テキスト [tsa_spam_chmapuru_by_text] 文字列型(カンマ区切り)
385
  global $default_spam_champuru_by_text;
386
 
387
  global $error_type;
388
 
389
 
390
+ // $spam_blacklist_hosts = get_option( 'tsa_spam_champuru_hosts', $default_spam_champuru_hosts );
391
  $spam_blacklist_by_text = get_option( 'tsa_spam_champuru_by_text', $default_spam_champuru_by_text);
392
 
393
  $spam_blacklist_by_text_lists = explode( ',', $spam_blacklist_by_text );
397
  }
398
  }
399
 
400
+ if ( strlen( trim( $spam_blacklist_by_text ) ) == 0 || count( $spam_blacklist_by_text_lists ) == 0 ) {
401
+ return TRUE;
402
+ }
403
+
404
  global $default_spam_champuru_by_text;
405
 
406
+ $check_list = $spam_blacklist_by_text_lists;
407
 
408
  $spam_def_ip = '127.0.0.2';
409
  $pattern = '/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/';
683
  global $default_ok_url_count;
684
  global $default_spam_champuru_flg;
685
 
686
+ //global $default_spam_champuru_hosts;
687
  global $default_spam_champuru_by_text;
688
 
689
  global $default_spam_limit_flg;
737
  update_option( 'tsa_dummy_param_field_flg', $_POST['tsa_dummy_param_field_flg'] );
738
  update_option( 'tsa_memo', $_POST['tsa_memo'] );
739
  update_option( 'tsa_spam_champuru_by_text', $_POST['tsa_spam_champuru_by_text'] );
740
+ //update_option( 'tsa_spam_champuru_hosts', ( isset( $_POST['tsa_spam_champuru_hosts'] ) ? $_POST['tsa_spam_champuru_hosts'] : NULL ) );
741
 
742
  // スパムデータベース作成
743
  $this->tsa_create_tbl();
1038
  </tr>
1039
  <tr>
1040
  <td>
1041
+ <h4>※多ければ多いほどトラッフィク量が上がりますので注意してください。</h4>
 
 
 
 
1042
 
 
 
 
 
 
 
 
 
 
 
1043
  <strong>【利用するスパムブラックリストサービスをテキスト入力(カンマ区切り)】</strong><br />
1044
  <input type="text" name="tsa_spam_champuru_by_text"
1045
  size="80"
1188
  <?php /**
1189
  <input
1190
  type="hidden" name="page_options"
1191
+ value="tsa_on_flg,tsa_japanese_string_min_count,tsa_back_second,tsa_caution_message,tsa_caution_msg_point,tsa_error_message,tsa_ng_keywords,tsa_ng_key_error_message,tsa_must_keywords,tsa_must_key_error_message,tsa_tb_on_flg,tsa_tb_url_flg,tsa_block_ip_addresses,tsa_ip_block_from_spam_chk_flg,tsa_block_ip_address_error_message,tsa_url_count_on_flg,tsa_ok_url_count,tsa_url_count_over_error_message,tsa_spam_data_save,tsa_spam_limit_flg,tsa_spam_limit_minutes,tsa_spam_limit_count,tsa_spam_limit_over_interval,tsa_spam_limit_over_interval_error_message,tsa_spam_champuru_flg,tsa_spam_keep_day_count,tsa_spam_data_delete_flg,tsa_white_ip_addresses,tsa_dummy_param_field_flg,tsa_memo,tsa_spam_champuru_by_text" />
1192
  */ ?>
1193
  <p class="submit" id="tsa_submit_button">
1194
  <input type="submit" class="button-primary"
throws_spam_away.php CHANGED
@@ -4,11 +4,11 @@
4
  Plugin URI: http://gti.jp/throws-spam-away/
5
  Description: コメント内に日本語の記述が存在しない場合はあたかも受け付けたように振る舞いながらも捨ててしまうプラグイン
6
  Author: 株式会社ジーティーアイ さとう たけし
7
- Version: 2.6.8
8
  Author URI: http://gti.jp/
9
  License: GPL2
10
  */
11
- /* Copyright 2014 Takeshi Satoh (http://gti.jp/)
12
 
13
  This program is free software; you can redistribute it and/or modify
14
  it under the terms of the GNU General Public License, version 2, as
@@ -33,7 +33,7 @@ require_once 'throws_spam_away.class.php';
33
  $tsa_spam_tbl_name = 'tsa_spam';
34
 
35
  // Throws SPAM Awayバージョン
36
- $tsa_version = '2.6.8';
37
  // スパムデータベースバージョン
38
  $tsa_db_version = 2.6; // 2.6からデータベース変更 [error_type]追加
39
 
@@ -100,9 +100,10 @@ $default_tb_url_flg = '1';
100
  // スパムちゃんぷるーホスト
101
  //$spam_champuru_host = 'dnsbl.spam-champuru.livedoor.com';
102
  // すぱむちゃんぷるー代替リスト化
103
- $spam_champuru_hosts = array("bsb.spamlookup.net", "bsb.empty.us", "list.dsbl.org", "all.rbl.jp");
 
104
 
105
- $default_spam_champuru_hosts = array("bsb.spamlookup.net");
106
 
107
  // スパムブラックリスト by テキスト
108
  $default_spam_champuru_by_text = "";
4
  Plugin URI: http://gti.jp/throws-spam-away/
5
  Description: コメント内に日本語の記述が存在しない場合はあたかも受け付けたように振る舞いながらも捨ててしまうプラグイン
6
  Author: 株式会社ジーティーアイ さとう たけし
7
+ Version: 2.6.9
8
  Author URI: http://gti.jp/
9
  License: GPL2
10
  */
11
+ /* Copyright 2015 Takeshi Satoh (http://gti.jp/)
12
 
13
  This program is free software; you can redistribute it and/or modify
14
  it under the terms of the GNU General Public License, version 2, as
33
  $tsa_spam_tbl_name = 'tsa_spam';
34
 
35
  // Throws SPAM Awayバージョン
36
+ $tsa_version = '2.6.9';
37
  // スパムデータベースバージョン
38
  $tsa_db_version = 2.6; // 2.6からデータベース変更 [error_type]追加
39
 
100
  // スパムちゃんぷるーホスト
101
  //$spam_champuru_host = 'dnsbl.spam-champuru.livedoor.com';
102
  // すぱむちゃんぷるー代替リスト化
103
+ // リスト廃止 2.6.9
104
+ //$spam_champuru_hosts = array("bsb.spamlookup.net", "bsb.empty.us", "list.dsbl.org", "all.rbl.jp");
105
 
106
+ //$default_spam_champuru_hosts = array("bsb.spamlookup.net");
107
 
108
  // スパムブラックリスト by テキスト
109
  $default_spam_champuru_by_text = "";