mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
Add options for spam count and interval
This commit is contained in:
parent
aef7f01ed9
commit
68c0ce3ae6
5 changed files with 60 additions and 31 deletions
|
|
@ -1,7 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
$lang->cmd_denied_ip = 'IP Address Blacklist';
|
$lang->cmd_denied_ip = 'IP Address Blacklist';
|
||||||
$lang->cmd_denied_word = 'Word Blacklist';
|
$lang->cmd_denied_word = 'Keyword Blacklist';
|
||||||
$lang->spamfilter = 'Spam filter';
|
$lang->cmd_config_block = 'Automatic Blocking';
|
||||||
|
$lang->add_denied_ip = 'Add IP address or range';
|
||||||
|
$lang->add_denied_word = 'Add keyword';
|
||||||
|
$lang->spamfilter = 'Spam Filter';
|
||||||
$lang->denied_ip = 'Blocked IP Address';
|
$lang->denied_ip = 'Blocked IP Address';
|
||||||
$lang->interval = 'Interval for spam filtering';
|
$lang->interval = 'Interval for spam filtering';
|
||||||
$lang->limit_count = 'No. of post limited';
|
$lang->limit_count = 'No. of post limited';
|
||||||
|
|
@ -10,22 +13,29 @@ $lang->word = 'Keyword';
|
||||||
$lang->hit = 'Hit';
|
$lang->hit = 'Hit';
|
||||||
$lang->latest_hit = 'Latest Hits';
|
$lang->latest_hit = 'Latest Hits';
|
||||||
$lang->about_interval = 'All articles attempted for posting within the assigned time will be blocked.';
|
$lang->about_interval = 'All articles attempted for posting within the assigned time will be blocked.';
|
||||||
$lang->about_limit_count = 'If exceeded the posting limitation,
|
$lang->about_denied_ip = 'Please enter one IP address (e.g. 127.0.0.1) or range (e.g. 127.0.0.0/24) per line. Comments may start with //.';
|
||||||
that IP will be regarded as a spam, thus will have limitations on posting articles, comments, and trackbacks.';
|
$lang->about_denied_word = 'Please enter one keyword per line. Keywords may contain 2 to 40 characters.';
|
||||||
$lang->about_denied_ip = 'You can add IP address range like 127.0.0.* by using *.';
|
$lang->msg_alert_limited_by_config = 'Please do not post repeatedly within %d seconds. If you keep trying, your IP address will be blocked.';
|
||||||
$lang->about_denied_word = 'When you add a word to Word Blacklist,
|
$lang->msg_alert_limited_message_by_config = 'Please do not send messages repeatedly within %d seconds. If you keep trying, your IP address will be blocked.';
|
||||||
articles including it will be blocked.';
|
$lang->msg_alert_denied_word = 'The word "%s" is not allowed on this site.';
|
||||||
$lang->about_check_trackback = 'A single IP per article is allowed for trackbacks.';
|
$lang->msg_alert_registered_denied_ip = 'Your IP address has been blocked for abuse. Please contact the administrator.';
|
||||||
$lang->msg_alert_limited_by_config = 'Posting an article within %s seconda is not allowed.\\n If you keep trying, your IP address will be blacklisted.';
|
|
||||||
$lang->msg_alert_limited_message_by_config = 'sending an message within %s seconda is not allowed.\\n If you keep trying, your IP address will be blacklisted.';
|
|
||||||
$lang->msg_alert_denied_word = 'The word "%s" is not allowed.';
|
|
||||||
$lang->msg_alert_registered_denied_ip = 'Your IP address is blacklisted,\\n so you may have limitations on normal using of this site.\\n If you have any questions on that matter, please contact the site administrator.';
|
|
||||||
$lang->msg_alert_trackback_denied = 'Only one trackback per an article is allowed.';
|
$lang->msg_alert_trackback_denied = 'Only one trackback per an article is allowed.';
|
||||||
$lang->cmd_interval = 'Do you want to blacklist the users who attempt to post articles more than 3 times for 10 seconds? The blacklisted users cannot write articles or comments and send trackbacks.';
|
$lang->cmd_interval = 'Block Post/Comment Spam';
|
||||||
$lang->cmd_check_trackback = 'Do you want to blacklist the users who attempt to post more than 2 trackbacks to one article? The blacklisted users cannot post trackbacks.';
|
$lang->cmd_interval_help = 'Block IP addresses that post or comment too much in a short time. Blocked IP addresses will not be able to post, comment, or send messages.';
|
||||||
|
$lang->cmd_check_trackback = 'Block Trackback Spam';
|
||||||
|
$lang->cmd_check_trackback_help = 'Block IP addresses that send multiple trackbacks to the same document.<br>This only works if the trackback module is installed.';
|
||||||
|
$lang->cmd_limits_interval = 'Block Interval';
|
||||||
|
$lang->cmd_limits_interval_help = 'Block IP addresses that post or comment too much within this number of seconds.';
|
||||||
|
$lang->cmd_limits_count = 'Post/Comment Count';
|
||||||
|
$lang->cmd_limits_count_help = 'Block IP addresses that post or comment this number of times within the above number of seconds.';
|
||||||
|
$lang->cmd_ipv4_block_range = 'IPv4 Block Range';
|
||||||
|
$lang->cmd_ipv6_block_range = 'IPv6 Block Range';
|
||||||
|
$lang->cmd_block_range_self = 'single IP address only';
|
||||||
|
$lang->cmd_block_range_help = 'This option allows you to block an entire range of IP addresses when a spammer is found.<br>Caution: if you block an excessively wide range, you may also end up blocking innocent users.';
|
||||||
|
$lang->cmd_block_range = 'IP addresses with the same %d last blocks';
|
||||||
|
$lang->unit_write_count = 'times';
|
||||||
$lang->add = 'Add';
|
$lang->add = 'Add';
|
||||||
$lang->yes = 'Yes';
|
|
||||||
$lang->no = 'No';
|
|
||||||
$lang->msg_duplicate = 'Duplicate';
|
$lang->msg_duplicate = 'Duplicate';
|
||||||
$lang->msg_invalid_ip = 'Invalid IP address format.';
|
$lang->msg_invalid_ip = 'Invalid IP address format.';
|
||||||
$lang->msg_invalid_word = 'Spam keywords must be between 2 and 40 characters.';
|
$lang->msg_invalid_word = 'Spam keywords must be between 2 and 40 characters.';
|
||||||
|
$lang->msg_faillist = '<br />Error (already blocked)<br /> %s ';
|
||||||
|
|
|
||||||
|
|
@ -13,26 +13,29 @@ $lang->word = '키워드';
|
||||||
$lang->hit = '히트';
|
$lang->hit = '히트';
|
||||||
$lang->latest_hit = '최근 히트';
|
$lang->latest_hit = '최근 히트';
|
||||||
$lang->about_interval = '지정된 시간 내에 글을 등록하지 못하게 합니다.';
|
$lang->about_interval = '지정된 시간 내에 글을 등록하지 못하게 합니다.';
|
||||||
$lang->about_limit_count = '지정된 시간 내에 제한수를 넘겨서 글 작성을 시도하면 스팸으로 인식, 해당 IP의 글 작성, 댓글 작성, 트랙백 발송, 쪽지 발송 등을 금지합니다.';
|
$lang->about_denied_ip = '한 줄에 하나씩 IP 주소(예: 127.0.0.1) 또는 대역(예: 127.0.0.0/24)을 입력하세요. // 뒷부분은 설명으로 저장됩니다. 예: 127.0.0.1 // 설명';
|
||||||
$lang->about_denied_ip = '\'스팸 IP // 메모\' 형식으로 입력하세요. 여러개의 항목은 줄을 바꾸어 입력하세요.';
|
$lang->about_denied_word = '한 줄에 하나씩 스팸 키워드를 입력하세요. (2~40자)';
|
||||||
$lang->about_denied_word = '여러개의 항목은 줄을 바꾸어 입력하세요. (2~40자)';
|
$lang->msg_alert_limited_by_config = '%d초 이내에 연속 글 작성은 금지됩니다. 계속 시도하면 IP가 차단될 수 있습니다.';
|
||||||
$lang->about_check_trackback = '한 글에 한 IP에만 트랙백을 허용할 수 있습니다.';
|
$lang->msg_alert_limited_message_by_config = '%d초 이내에 연속 쪽지 발송은 금지됩니다. 계속 시도하면 IP가 차단될 수 있습니다.';
|
||||||
$lang->msg_alert_limited_by_config = '%s 초 이내에 글 작성은 금지 됩니다. 계속 시도하면 금지 IP에 등록될 수 있습니다.';
|
$lang->msg_alert_denied_word = '"%s"은(는) 사용이 금지된 단어입니다.';
|
||||||
$lang->msg_alert_limited_message_by_config = '%s 초 이내에 쪽지 발송은 금지 됩니다. 계속 시도하면 금지 IP에 등록될 수 있습니다.';
|
$lang->msg_alert_registered_denied_ip = 'IP가 차단되었습니다. 사이트 관리자에게 문의 바랍니다.';
|
||||||
$lang->msg_alert_denied_word = '"%s"는 사용 금지된 단어입니다.';
|
|
||||||
$lang->msg_alert_registered_denied_ip = '금지 IP에 등록되어 정상적인 활동에 제한을 받게 됐습니다. 사이트 관리자에게 문의 바랍니다.';
|
|
||||||
$lang->msg_alert_trackback_denied = '한 글에는 하나의 트랙백만 허용됩니다.';
|
$lang->msg_alert_trackback_denied = '한 글에는 하나의 트랙백만 허용됩니다.';
|
||||||
$lang->cmd_interval = '글, 댓글 스팸 차단';
|
$lang->cmd_interval = '글, 댓글 스팸 차단';
|
||||||
$lang->cmd_interval_help = '10초 동안 3회 이상 글이나 댓글을 작성하면 스패머로 간주하고 글, 댓글 작성과 엮인글 발송, 쪽지 발송을 차단합니다.';
|
$lang->cmd_interval_help = '아래에 지정한 시간 내에 다수의 글이나 댓글을 작성하면 스패머로 간주하고 글, 댓글 작성과 엮인글 발송, 쪽지 발송을 차단합니다.';
|
||||||
$lang->cmd_check_trackback = '트랙백 스팸 차단';
|
$lang->cmd_check_trackback = '트랙백 스팸 차단';
|
||||||
$lang->cmd_check_trackback_help = '하나의 글에 2회 이상 엮인글을 등록하면 스패머로 간주하고 엮인글을 차단합니다.<br>트랙백 모듈이 설치되어 있는 경우에만 적용됩니다.';
|
$lang->cmd_check_trackback_help = '하나의 글에 2회 이상 엮인글을 등록하면 스패머로 간주하고 엮인글을 차단합니다.<br>트랙백 모듈이 설치되어 있는 경우에만 적용됩니다.';
|
||||||
|
$lang->cmd_limits_interval = '글, 댓글 제한 시간';
|
||||||
|
$lang->cmd_limits_interval_help = '지정한 시간 내에 아래의 갯수만큼 글이나 댓글을 작성하면 스패머로 간주합니다.';
|
||||||
|
$lang->cmd_limits_count = '글, 댓글 작성 갯수';
|
||||||
|
$lang->cmd_limits_count_help = '위에서 지정한 시간 내에 이 갯수만큼 글이나 댓글을 작성하면 스패머로 간주합니다.';
|
||||||
$lang->cmd_ipv4_block_range = 'IPv4 차단 범위';
|
$lang->cmd_ipv4_block_range = 'IPv4 차단 범위';
|
||||||
$lang->cmd_ipv6_block_range = 'IPv6 차단 범위';
|
$lang->cmd_ipv6_block_range = 'IPv6 차단 범위';
|
||||||
$lang->cmd_block_range_self = '해당 IP만 차단';
|
$lang->cmd_block_range_self = '해당 IP만 차단';
|
||||||
$lang->cmd_block_range_help = '스패머 발견시 비슷한 대역의 IP를 한꺼번에 차단할 수 있습니다.<br>지나치게 광범위하게 차단하면 정상적인 사용자에게 피해가 발생할 수 있으니 주의하시기 바랍니다.';
|
$lang->cmd_block_range_help = '스패머 발견시 비슷한 대역의 IP를 한꺼번에 차단할 수 있습니다. 숫자가 작을수록 광범위하게 차단됩니다.<br>지나치게 광범위하게 차단하면 정상적인 사용자에게 피해가 발생할 수 있으니 주의하시기 바랍니다.';
|
||||||
$lang->cmd_block_range = '마지막 %s자리가 같은 IP를 모두 차단';
|
$lang->cmd_block_range = '마지막 %d자리가 같은 IP를 모두 차단';
|
||||||
|
$lang->unit_write_count = '회';
|
||||||
$lang->add = '추가';
|
$lang->add = '추가';
|
||||||
$lang->msg_duplicate = '이미 존재합니다.';
|
$lang->msg_duplicate = '이미 존재합니다.';
|
||||||
$lang->msg_invalid_ip = 'IP 주소 형식이 올바르지 않습니다.';
|
$lang->msg_invalid_ip = 'IP 주소 형식이 올바르지 않습니다.';
|
||||||
$lang->msg_invalid_word = '스팸 키워드는 2~40자 사이여야 합니다.';
|
$lang->msg_invalid_word = '스팸 키워드는 2~40자 사이여야 합니다.';
|
||||||
$lang->msg_faillist = '<br />실패(이미 존재합니다.) <br /> %s ';
|
$lang->msg_faillist = '<br />실패 (이미 차단되어 있습니다)<br /> %s ';
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ class spamfilterAdminController extends spamfilter
|
||||||
function procSpamfilterAdminInsertConfig()
|
function procSpamfilterAdminInsertConfig()
|
||||||
{
|
{
|
||||||
// Get the default information
|
// Get the default information
|
||||||
$args = Context::gets('limits', 'check_trackback', 'ipv4_block_range', 'ipv6_block_range');
|
$args = Context::gets('limits', 'limits_interval', 'limits_count', 'check_trackback', 'ipv4_block_range', 'ipv6_block_range');
|
||||||
|
|
||||||
// Set default values
|
// Set default values
|
||||||
if ($args->limits != 'Y')
|
if ($args->limits != 'Y')
|
||||||
|
|
@ -36,6 +36,8 @@ class spamfilterAdminController extends spamfilter
|
||||||
{
|
{
|
||||||
$args->ipv6_block_range = '';
|
$args->ipv6_block_range = '';
|
||||||
}
|
}
|
||||||
|
$args->limits_interval = intval($args->limits_interval);
|
||||||
|
$args->limits_count = intval($args->limits_count);
|
||||||
|
|
||||||
// Create and insert the module Controller object
|
// Create and insert the module Controller object
|
||||||
$oModuleController = getController('module');
|
$oModuleController = getController('module');
|
||||||
|
|
|
||||||
|
|
@ -103,8 +103,8 @@ class spamfilterModel extends spamfilter
|
||||||
$config = $this->getConfig();
|
$config = $this->getConfig();
|
||||||
|
|
||||||
if($config->limits != 'Y') return new Object();
|
if($config->limits != 'Y') return new Object();
|
||||||
$limit_count = '3';
|
$limit_count = $config->limits_count ?: 3;
|
||||||
$interval = '10';
|
$interval = $config->limits_interval ?: 10;
|
||||||
|
|
||||||
$count = $this->getLogCount($interval);
|
$count = $this->getLogCount($interval);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,20 @@
|
||||||
<p class="x_help-block">{$lang->cmd_check_trackback_help}</p>
|
<p class="x_help-block">{$lang->cmd_check_trackback_help}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="x_control-group">
|
||||||
|
<label for="limits_interval" class="x_control-label">{$lang->cmd_limits_interval}</label>
|
||||||
|
<div class="x_controls">
|
||||||
|
<input type="number" name="limits_interval" id="limits_interval" value="{intval($config->limits_interval) ?: 10}" /> {$lang->unit_sec}
|
||||||
|
<p class="x_help-block">{$lang->cmd_limits_interval_help}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="x_control-group">
|
||||||
|
<label for="limits_count" class="x_control-label">{$lang->cmd_limits_count}</label>
|
||||||
|
<div class="x_controls">
|
||||||
|
<input type="number" name="limits_count" id="limits_count" value="{intval($config->limits_count) ?: 3}" /> {$lang->unit_write_count}
|
||||||
|
<p class="x_help-block">{$lang->cmd_limits_count_help}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="x_control-group">
|
<div class="x_control-group">
|
||||||
<label for="ipv4_block_range" class="x_control-label">{$lang->cmd_ipv4_block_range}</label>
|
<label for="ipv4_block_range" class="x_control-label">{$lang->cmd_ipv4_block_range}</label>
|
||||||
<div class="x_controls">
|
<div class="x_controls">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue