2014-12-24 추가
관리자일때는 object 와 embed가 필터링 되는 것도 아래 동영상 주소에서 송출되는 것은 가능하도록 추가했습니다.
- 유튜브 : youtu.be / youtube.com
- Vimeo : vimeo.com
- 네이버 : nmv.naver.com / MovieFlvPlayer.nhn
- 다음 : videofarm.daum.net
그누보드 / lib / common.lib.php
// 악성태그 변환
function bad_tag_convert($code)
{
...
}
를 아래와 같이 변경
// 악성태그 변환
function bad_tag_convert($code)
{
global $view;
global $member, $is_admin;
if ($is_admin && $member[mb_id] != $view[mb_id]) {
//$code = preg_replace_callback("#(\<(embed|object)[^\>]*)\>(\<\/(embed|object)\>)?#i",
// embed 또는 object 태그를 막지 않는 경우 필터링이 되도록 수정
if (!preg_match('/youtu.be/', $_SERVER['SERVER_NAME']) == true || !preg_match('/youtube.com/', $_SERVER['SERVER_NAME']) == true || !preg_match('/vimeo.com/', $_SERVER['SERVER_NAME']) == true || !preg_match('/videofarm.daum.net/', $_SERVER['SERVER_NAME']) == true || !preg_match('/rmcnmv.naver.com/', $_SERVER['SERVER_NAME']) == true || !preg_match('/nmv.naver.com/', $_SERVER['SERVER_NAME']) == true || !preg_match('/MovieFlvPlayer.nhn/', $_SERVER['SERVER_NAME']) == true) { } else { $code = preg_replace_callback("#(\<(embed|object)[^\>]*)\>?(\<\/(embed|object)\>)?#i",
create_function('$matches', 'return "<div class=\"embedx\">보안문제로 인하여 관리자 아이디로는 embed 또는 object 태그를 볼 수 없습니다. 확인하시려면 관리권한이 없는 다른 아이디로 접속하세요.</div>";'),
$code); } // 해피정닷컴 2014-12-24
}
//return preg_replace("/\<([\/]?)(script|iframe)([^\>]*)\>/i", "<$1$2$3>", $code);
// script 나 iframe 태그를 막지 않는 경우 필터링이 되도록 수정
if (!preg_match('/youtu.be/', $_SERVER['SERVER_NAME']) == true || !preg_match('/youtube.com/', $_SERVER['SERVER_NAME']) == true || !preg_match('/vimeo.com/', $_SERVER['SERVER_NAME']) == true || !preg_match('/videofarm.daum.net/', $_SERVER['SERVER_NAME']) == true || !preg_match('/rmcnmv.naver.com/', $_SERVER['SERVER_NAME']) == true || !preg_match('/nmv.naver.com/', $_SERVER['SERVER_NAME']) == true || !preg_match('/MovieFlvPlayer.nhn/', $_SERVER['SERVER_NAME']) == true) { return preg_replace("/\<([\/]?)(script)([^\>]*)\>?/i", "<$1$2$3>", $code); } else { return preg_replace("/\<([\/]?)(script|iframe|form|applet)([^\>]*)\>?/i", "<$1$2$3>", $code); } // 해피정닷컴 2014-12-24
}
관리자일때는 object 와 embed가 필터링 되는 것도 아래 동영상 주소에서 송출되는 것은 가능하도록 추가했습니다.
- 유튜브 : youtu.be / youtube.com
- Vimeo : vimeo.com
- 네이버 : nmv.naver.com / MovieFlvPlayer.nhn
- 다음 : videofarm.daum.net
그누보드 / lib / common.lib.php
// 악성태그 변환
function bad_tag_convert($code)
{
...
}
를 아래와 같이 변경
// 악성태그 변환
function bad_tag_convert($code)
{
global $view;
global $member, $is_admin;
if ($is_admin && $member[mb_id] != $view[mb_id]) {
//$code = preg_replace_callback("#(\<(embed|object)[^\>]*)\>(\<\/(embed|object)\>)?#i",
// embed 또는 object 태그를 막지 않는 경우 필터링이 되도록 수정
if (!preg_match('/youtu.be/', $_SERVER['SERVER_NAME']) == true || !preg_match('/youtube.com/', $_SERVER['SERVER_NAME']) == true || !preg_match('/vimeo.com/', $_SERVER['SERVER_NAME']) == true || !preg_match('/videofarm.daum.net/', $_SERVER['SERVER_NAME']) == true || !preg_match('/rmcnmv.naver.com/', $_SERVER['SERVER_NAME']) == true || !preg_match('/nmv.naver.com/', $_SERVER['SERVER_NAME']) == true || !preg_match('/MovieFlvPlayer.nhn/', $_SERVER['SERVER_NAME']) == true) { } else { $code = preg_replace_callback("#(\<(embed|object)[^\>]*)\>?(\<\/(embed|object)\>)?#i",
create_function('$matches', 'return "<div class=\"embedx\">보안문제로 인하여 관리자 아이디로는 embed 또는 object 태그를 볼 수 없습니다. 확인하시려면 관리권한이 없는 다른 아이디로 접속하세요.</div>";'),
$code); } // 해피정닷컴 2014-12-24
}
//return preg_replace("/\<([\/]?)(script|iframe)([^\>]*)\>/i", "<$1$2$3>", $code);
// script 나 iframe 태그를 막지 않는 경우 필터링이 되도록 수정
if (!preg_match('/youtu.be/', $_SERVER['SERVER_NAME']) == true || !preg_match('/youtube.com/', $_SERVER['SERVER_NAME']) == true || !preg_match('/vimeo.com/', $_SERVER['SERVER_NAME']) == true || !preg_match('/videofarm.daum.net/', $_SERVER['SERVER_NAME']) == true || !preg_match('/rmcnmv.naver.com/', $_SERVER['SERVER_NAME']) == true || !preg_match('/nmv.naver.com/', $_SERVER['SERVER_NAME']) == true || !preg_match('/MovieFlvPlayer.nhn/', $_SERVER['SERVER_NAME']) == true) { return preg_replace("/\<([\/]?)(script)([^\>]*)\>?/i", "<$1$2$3>", $code); } else { return preg_replace("/\<([\/]?)(script|iframe|form|applet)([^\>]*)\>?/i", "<$1$2$3>", $code); } // 해피정닷컴 2014-12-24
}
댓글 15개
게시글 목록
| 번호 | 제목 |
|---|---|
| 32970 | |
| 32959 | |
| 32937 | |
| 32917 | |
| 32909 | |
| 32899 | |
| 32885 | |
| 32884 | |
| 32862 | |
| 32861 | |
| 32860 | |
| 32840 | |
| 32814 | |
| 32804 | |
| 32795 | |
| 32784 | |
| 32783 | |
| 32750 | |
| 32740 | |
| 32732 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기