원격 코드 실행 취약점 수정 ( 17-0524,525 )

This commit is contained in:
thisgun
2017-09-07 10:05:14 +09:00
parent 7e5e973d09
commit 277ce801e6
2 changed files with 37 additions and 5 deletions

View File

@ -140,6 +140,28 @@ function frm_install_submit(f)
alert('최고관리자 E-mail 을 입력하십시오.'); f.admin_email.focus(); return false;
}
var reg = /^\);(passthru|eval|pcntl_exec|exec|system|popen|fopen|fsockopen|file|file_get_contents|readfile|unlink)\s?\(\$_(get|post|request)\s?\[.*?\]\s?\)/gi;
var reg_msg = " 에 유효하지 않는 문자가 있습니다. 다른 문자로 대체해 주세요.";
if( reg.test(f.mysql_host.value) ){
alert('MySQL Host'+reg_msg); f.mysql_host.focus(); return false;
}
if( reg.test(f.mysql_user.value) ){
alert('MySQL User'+reg_msg); f.mysql_user.focus(); return false;
}
if( f.mysql_pass.value && reg.test(f.mysql_pass.value) ){
alert('MySQL PASSWORD'+reg_msg); f.mysql_pass.focus(); return false;
}
if( reg.test(f.mysql_db.value) ){
alert('MySQL DB'+reg_msg); f.mysql_db.focus(); return false;
}
if( f.table_prefix.value && reg.test(f.table_prefix.value) ){
alert('TABLE명 접두사'+reg_msg); f.table_prefix.focus(); return false;
}
if(/^[a-z][a-z0-9]/i.test(f.admin_id.value) == false) {
alert('최고관리자 회원 ID는 첫자는 반드시 영문자 그리고 영문자와 숫자로만 만드셔야 합니다.');