#17165259. captcha 애드온에 비밀번호 찾기 기능에 대해서도 가로채서 봇/프로그램 체크 유무를 확인할 수 있도록 하는 기능을 추가.

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6325 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2009-05-18 07:02:42 +00:00
parent b729bc68f0
commit e78953d5b8
3 changed files with 40 additions and 2 deletions

View file

@ -18,6 +18,12 @@
if($logged_info->is_admin == 'Y' || $logged_info->is_site_admin) return;
if($addon_info->target != 'all' && Context::get('is_logged')) return;
$target_acts = array('procBoardInsertDocument','procBoardInsertComment','procIssuetrackerInsertIssue','procIssuetrackerInsertHistory');
if($addon_info->apply_find_account=='apply') $target_acts[] = 'procMemberFindAccount';
Context::addHtmlHeader('<script type="text/javascript"> var captchaTargetAct = new Array("'.implode('","',$target_acts).'"); </script>');
// 캡챠 인증이 되지 않은 세션이면 실행 시작
if(!$_SESSION['captcha_authed']) {
@ -100,7 +106,7 @@
Context::addJsFile('./addons/captcha/captcha.js',false);
// 게시판/ 이슈트래커의 글쓰기/댓글쓰기 액션 호출시 세션 비교
if(in_array(Context::get('act'), array('procBoardInsertDocument','procBoardInsertComment','procIssuetrackerInsertIssue','procIssuetrackerInsertHistory'))) {
if(in_array(Context::get('act'), $target_acts)) {
$this->error = "msg_not_permitted";
}
}

View file

@ -33,7 +33,17 @@ var calledArgs = null;
body.append(captchaXE);
captchaXE.exec = function(module, act, params, callback_func, response_tags, callback_func_arg, fo_obj) {
if(act == 'procBoardInsertDocument' || act == 'procBoardInsertComment' || act == 'procIssuetrackerInsertIssue' || act == 'procIssuetrackerInsertHistory') {
var doCheck = false;
if(typeof(captchaTargetAct)!='undefined') {
for(var i in captchaTargetAct) {
if(captchaTargetAct[i]==act) {
doCheck = true;
break;
}
}
}
if(doCheck) {
calledArgs = {'module':module,'act':act,'params':params,'callback_func':callback_func,'response_tags':response_tags,'callback_func_arg':callback_func_arg,'fo_obj':fo_obj};
oldExecXml('captcha','setCaptchaSession',new Array(),captchaXE.show,new Array('error','message','about','keyword'));
} else {

View file

@ -74,5 +74,27 @@
<title xml:lang="zh-TW">每次</title>
</options>
</var>
<var name="apply_find_account" type="select">
<title xml:lang="ko">비밀번호 찾기 적용</title>
<title xml:lang="zh-CN">비밀번호 찾기 적용</title>
<title xml:lang="jp">비밀번호 찾기 적용</title>
<title xml:lang="zh-TW">비밀번호 찾기 적용</title>
<description xml:lang="ko">적용으로 하시면 비밀번호찾기 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다.</description>
<description xml:lang="zh-CN">적용으로 하시면 비밀번호찾기 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다.</description>
<description xml:lang="jp">적용으로 하시면 비밀번호찾기 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다.</description>
<description xml:lang="zh-TW">적용으로 하시면 비밀번호찾기 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다.</description>
<options value="">
<title xml:lang="ko">적용하지 않음</title>
<title xml:lang="zh-CN">적용하지 않음</title>
<title xml:lang="jp">적용하지 않음</title>
<title xml:lang="zh-TW">적용하지 않음</title>
</options>
<options value="apply">
<title xml:lang="ko">적용</title>
<title xml:lang="zh-CN">적용</title>
<title xml:lang="jp">적용</title>
<title xml:lang="zh-TW">적용</title>
</options>
</var>
</extra_vars>
</addon>