diff --git a/bbs/kcp/kcpcert_request.php b/bbs/kcp/kcpcert_request.php
index 00fe64744..b9057c28f 100644
--- a/bbs/kcp/kcpcert_request.php
+++ b/bbs/kcp/kcpcert_request.php
@@ -1,8 +1,16 @@
include_once('./kcpcert_config.php');
-// UTF-8 ȯ濡 ؽ ڵ
-setlocale(LC_CTYPE, 'ko_KR.euc-kr');
+// utf-8로 넘어돈 post 값을 euc-kr 로 변경
+$_POST = array_map("iconv_euckr", $_POST);
+
+// UTF-8 환경에서 해시 데이터 오류를 막기 위한 코드
+$def_locale = setlocale(LC_CTYPE, 0);
+$locale_change = false;
+if(preg_match("/utf[\-]?8/i", $def_locale)) {
+ setlocale(LC_CTYPE, 'ko_KR.euc-kr');
+ $locale_change = true;
+}
$req_tx = "";
@@ -18,16 +26,13 @@ $local_code = "";
$up_hash = "";
/*------------------------------------------------------------------------*/
-/* :: ü Ķ */
+/* :: 전체 파라미터 남기기 */
/*------------------------------------------------------------------------*/
$ct_cert = new C_CT_CLI;
$ct_cert->mf_clear();
-// utf-8 Ѿ post euc-kr
-$_POST = array_map("iconv_euckr", $_POST);
-
-// request Ѿ ó
+// request 로 넘어온 값 처리
$key = array_keys($_POST);
$sbParam ="";
@@ -81,16 +86,16 @@ for($i=0; $i";
}
if ( $req_tx == "cert" )
{
- // !!up_hash
- // year , month , day ִ "00" , "00" , "00" ˴ϴ
- // ""(null) Ͻø ˴ϴ.
- // up_hash site_cd ordr_idxx ʼ Դϴ.
+ // !!up_hash 데이터 생성시 주의 사항
+ // year , month , day 가 비어 있는 경우 "00" , "00" , "00" 으로 설정이 됩니다
+ // 그외의 값은 없을 경우 ""(null) 로 세팅하시면 됩니다.
+ // up_hash 데이터 생성시 site_cd 와 ordr_idxx 는 필수 값입니다.
$hash_data = $site_cd .
$ordr_idxx .
$user_name .
@@ -102,7 +107,7 @@ if ( $req_tx == "cert" )
$up_hash = $ct_cert->make_hash_data( $home_dir, $hash_data );
- // â ѱ form ʵ ( up_hash )
+ // 인증창으로 넘기는 form 데이터 생성 필드 ( up_hash )
$sbParam .= "";
}
@@ -119,10 +124,10 @@ $ct_cert->mf_clear();
{
var frm = document.form_auth;
- // û ȣ Լ
+ // 인증 요청 시 호출 함수
if ( frm.req_tx.value == "cert" )
{
- opener.document.form_auth.veri_up_hash.value = frm.up_hash.value; // up_hash ʵ
+ opener.document.form_auth.veri_up_hash.value = frm.up_hash.value; // up_hash 데이터 검증을 위한 필드
frm.action="=$cert_url?>";
frm.submit();
@@ -135,4 +140,9 @@ $ct_cert->mf_clear();
= $sbParam ?>