1:1문의 이메일 입력 XSS 취약점 재수정

This commit is contained in:
chicpro
2014-06-11 15:12:57 +09:00
parent 2adccca817
commit 9a16993762
3 changed files with 6 additions and 7 deletions

View File

@ -2711,12 +2711,11 @@ function member_delete($mb_id)
sql_query($sql);
}
// strip_tags 변형
function strip_tags2($str)
// 이메일 주소 추출
function get_email_address($email)
{
if(!$str)
return '';
preg_match("/[0-9a-z._-]+@[a-z0-9._-]{4,}/i", $email, $matches);
return strip_tags(preg_replace("#<script[^<]*</script[^>]*>#i", "", $str));
return $matches[0];
}
?>