From e78953d5b847017b038b9dd1ace8562a550f6ffc Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 18 May 2009 07:02:42 +0000 Subject: [PATCH] =?UTF-8?q?#17165259.=20captcha=20=EC=95=A0=EB=93=9C?= =?UTF-8?q?=EC=98=A8=EC=97=90=20=EB=B9=84=EB=B0=80=EB=B2=88=ED=98=B8=20?= =?UTF-8?q?=EC=B0=BE=EA=B8=B0=20=EA=B8=B0=EB=8A=A5=EC=97=90=20=EB=8C=80?= =?UTF-8?q?=ED=95=B4=EC=84=9C=EB=8F=84=20=EA=B0=80=EB=A1=9C=EC=B1=84?= =?UTF-8?q?=EC=84=9C=20=EB=B4=87/=ED=94=84=EB=A1=9C=EA=B7=B8=EB=9E=A8=20?= =?UTF-8?q?=EC=B2=B4=ED=81=AC=20=EC=9C=A0=EB=AC=B4=EB=A5=BC=20=ED=99=95?= =?UTF-8?q?=EC=9D=B8=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=ED=95=98=EB=8A=94=20=EA=B8=B0=EB=8A=A5=EC=9D=84=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6325 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- addons/captcha/captcha.addon.php | 8 +++++++- addons/captcha/captcha.js | 12 +++++++++++- addons/captcha/conf/info.xml | 22 ++++++++++++++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/addons/captcha/captcha.addon.php b/addons/captcha/captcha.addon.php index a3790652c..4fa01548f 100644 --- a/addons/captcha/captcha.addon.php +++ b/addons/captcha/captcha.addon.php @@ -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(''); + + // 캡챠 인증이 되지 않은 세션이면 실행 시작 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"; } } diff --git a/addons/captcha/captcha.js b/addons/captcha/captcha.js index 32178b61a..bda1a6e40 100644 --- a/addons/captcha/captcha.js +++ b/addons/captcha/captcha.js @@ -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 { diff --git a/addons/captcha/conf/info.xml b/addons/captcha/conf/info.xml index b0e17f9cd..b1c283de1 100644 --- a/addons/captcha/conf/info.xml +++ b/addons/captcha/conf/info.xml @@ -74,5 +74,27 @@ 每次 + + 비밀번호 찾기 적용 + 비밀번호 찾기 적용 + 비밀번호 찾기 적용 + 비밀번호 찾기 적용 + 적용으로 하시면 비밀번호찾기 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다. + 적용으로 하시면 비밀번호찾기 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다. + 적용으로 하시면 비밀번호찾기 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다. + 적용으로 하시면 비밀번호찾기 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다. + + 적용하지 않음 + 적용하지 않음 + 적용하지 않음 + 적용하지 않음 + + + 적용 + 적용 + 적용 + 적용 + +