mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-12 13:32:16 +09:00
스팸필터의 스팸엮인글 처리 부분을 강화 (제목/내용/블로그이름/내용등도 or 비교) 하고 C 클래스 ip 금지
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3268 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
9a1dfed6f7
commit
f9a2015e23
5 changed files with 29 additions and 9 deletions
|
|
@ -108,11 +108,11 @@
|
||||||
$oTrackbackModel = &getModel('trackback');
|
$oTrackbackModel = &getModel('trackback');
|
||||||
list($ipA,$ipB,$ipC,$ipD) = explode('.',$_SERVER['REMOTE_ADDR']);
|
list($ipA,$ipB,$ipC,$ipD) = explode('.',$_SERVER['REMOTE_ADDR']);
|
||||||
$ipaddress = $ipA.'.'.$ipB.'.'.$ipC;
|
$ipaddress = $ipA.'.'.$ipB.'.'.$ipC;
|
||||||
$count = $oTrackbackModel->getRegistedTrackback(24*60*60, $ipaddress);
|
$count = $oTrackbackModel->getRegistedTrackback(12*60*60, $ipaddress, $obj->url, $obj->blog_name, $obj->title, $obj->excerpt);
|
||||||
if($count > 2) {
|
if($count > 2) {
|
||||||
$oTrackbackController = &getController('trackback');
|
$oTrackbackController = &getController('trackback');
|
||||||
$oTrackbackController->deleteTrackbackSender(24*60*60, $ipaddress);
|
$oTrackbackController->deleteTrackbackSender(12*60*60, $ipaddress, $obj->url, $obj->blog_name, $obj->title, $obj->excerpt);
|
||||||
$this->insertIP($_SERVER['REMOTE_ADDR']);
|
$this->insertIP($ipaddress.'.*');
|
||||||
return new Object(-1,'msg_alert_trackback_denied');
|
return new Object(-1,'msg_alert_trackback_denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,13 @@
|
||||||
<column name="count(*)" alias="count" />
|
<column name="count(*)" alias="count" />
|
||||||
</columns>
|
</columns>
|
||||||
<conditions>
|
<conditions>
|
||||||
<condition operation="like_prefix" column="ipaddress" var="ipaddress" notnull="notnull" />
|
<condition operation="more" column="regdate" var="regdate" notnull="notnull" />
|
||||||
<condition operation="more" column="regdate" var="regdate" notnull="notnull" pipe="and" />
|
<group pipe="and">
|
||||||
|
<condition operation="like_prefix" column="ipaddress" var="ipaddress" />
|
||||||
|
<condition operation="equal" column="url" var="url" pipe="or" />
|
||||||
|
<condition operation="equal" column="blog_name" var="blog_name" pipe="or" />
|
||||||
|
<condition operation="equal" column="title" var="title" pipe="or" />
|
||||||
|
<condition operation="equal" column="excerpt" var="excerpt" pipe="or" />
|
||||||
|
</group>
|
||||||
</conditions>
|
</conditions>
|
||||||
</query>
|
</query>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,13 @@
|
||||||
<column name="*" />
|
<column name="*" />
|
||||||
</columns>
|
</columns>
|
||||||
<conditions>
|
<conditions>
|
||||||
<condition operation="like_prefix" column="ipaddress" var="ipaddress" notnull="notnull" />
|
<condition operation="more" column="regdate" var="regdate" notnull="notnull" />
|
||||||
<condition operation="more" column="regdate" var="regdate" notnull="notnull" pipe="and" />
|
<group pipe="and">
|
||||||
|
<condition operation="like_prefix" column="ipaddress" var="ipaddress" notnull="notnull" />
|
||||||
|
<condition operation="equal" column="url" var="url" pipe="or" />
|
||||||
|
<condition operation="equal" column="blog_name" var="blog_name" pipe="or" />
|
||||||
|
<condition operation="equal" column="title" var="title" pipe="or" />
|
||||||
|
<condition operation="equal" column="excerpt" var="excerpt" pipe="or" />
|
||||||
|
</group>
|
||||||
</conditions>
|
</conditions>
|
||||||
</query>
|
</query>
|
||||||
|
|
|
||||||
|
|
@ -292,9 +292,13 @@
|
||||||
/**
|
/**
|
||||||
* @brief 특정 ipaddress의 특정 시간대 내의 엮인글을 모두 삭제
|
* @brief 특정 ipaddress의 특정 시간대 내의 엮인글을 모두 삭제
|
||||||
**/
|
**/
|
||||||
function deleteTrackbackSender($time, $ipaddress) {
|
function deleteTrackbackSender($time, $ipaddress, $url, $blog_name, $title, $excerpt) {
|
||||||
$obj->regdate = date("YmdHis",time()-$time);
|
$obj->regdate = date("YmdHis",time()-$time);
|
||||||
$obj->ipaddress = $ipaddress;
|
$obj->ipaddress = $ipaddress;
|
||||||
|
$obj->url = $url;
|
||||||
|
$obj->blog_name = $blog_name;
|
||||||
|
$obj->title = $title;
|
||||||
|
$obj->excerpt = $excerpt;
|
||||||
$output = executeQueryArray('trackback.getRegistedTrackbacks', $obj);
|
$output = executeQueryArray('trackback.getRegistedTrackbacks', $obj);
|
||||||
if(!$output->data || !count($output->data)) return;
|
if(!$output->data || !count($output->data)) return;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -101,9 +101,13 @@
|
||||||
/**
|
/**
|
||||||
* @brief 정해진 시간내에 전체 엮인글 등록수를 구함
|
* @brief 정해진 시간내에 전체 엮인글 등록수를 구함
|
||||||
**/
|
**/
|
||||||
function getRegistedTrackback($time, $ipaddress) {
|
function getRegistedTrackback($time, $ipaddress, $url, $blog_name, $title, $excerpt) {
|
||||||
$obj->regdate = date("YmdHis",time()-$time);
|
$obj->regdate = date("YmdHis",time()-$time);
|
||||||
$obj->ipaddress = $ipaddress;
|
$obj->ipaddress = $ipaddress;
|
||||||
|
$obj->url = $url;
|
||||||
|
$obj->blog_name = $blog_name;
|
||||||
|
$obj->title = $title;
|
||||||
|
$obj->excerpt = $excerpt;
|
||||||
$output = executeQuery('trackback.getRegistedTrackback', $obj);
|
$output = executeQuery('trackback.getRegistedTrackback', $obj);
|
||||||
return $output->data->count;
|
return $output->data->count;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue