iframe 동영상 퍼가기 질문
|
답변 4개 / 댓글 2개
2018-11-03 (토) 19:07:26
많은 도움이 되었습니다. 감사합니다.
2015-05-06 (수) 11:13:35
정말 너무 너무 감사드립니다. 복 받으실 겁니다.
돼지코구뇽
2014-02-06 (목) 05:07:04
lib/common.lib.php 파일에서
내용을 변환 부분을 이걸로 교체하셔요
해킹때문에 관리자만 아이프레임 사용할수 있도록함
// 내용을 변환
function conv_content($content, $html)
{
global $config, $board, $member, $view;
if ($html)
{
$source = array();
$target = array();
$source[] = "//";
$target[] = "";
if ($html == 2) { // 자동 줄바꿈
$source[] = "/\n/";
$target[] = "<br/>";
}
// 테이블 태그의 갯수를 세어 테이블이 깨지지 않도록 한다.
$table_begin_count = substr_count(strtolower($content), "<table");
$table_end_count = substr_count(strtolower($content), "</table");
for ($i=$table_end_count; $i<$table_begin_count; $i++)
{
$content .= "</table>";
}
$content = preg_replace($source, $target, $content);
$adm=is_admin($view[mb_id]);
if ($adm != 'super' && $adm != 'group') $content = bad_tag_convert($content);
// XSS (Cross Site script) 막기
// 완벽한 XSS 방지는 없다.
// 081022 : CSRF 방지
//$content = preg_replace("/(on)(abort|blur|change|click|dblclick|dragdrop|error|focus|keydown|keypress|keyup|load|mousedown|mousemove|mouseout|mouseover|mouseup|mouseenter|mouseleave|move|reset|resize|select|submit|unload)/i", "$1<!-- XSS Filter -->$2", $content);
//$content = preg_replace("/(on)([^\=]+)/i", "on$2", $content);
if ($adm != 'super' && $adm != 'group') $content = preg_replace("/(on)([a-z]+)([^a-z]*)(\=)/i", "on$2$3$4", $content);
$content = preg_replace("/(dy)(nsrc)/i", "dy$2", $content);
$content = preg_replace("/(lo)(wsrc)/i", "lo$2", $content);
if ($adm != 'super' && $adm != 'group') $content = preg_replace("/(sc)(ript)/i", "sc$2", $content);
$content = preg_replace("/(ex)(pression)/i", "ex$2", $content);
}
else // text 이면
{
// & 처리 : & 등의 코드를 정상 출력함
$content = html_symbol($content);
// 공백 처리
//$content = preg_replace("/ /", " ", $content);
$content = str_replace(" ", " ", $content);
$content = str_replace("\n ", "\n ", $content);
$content = get_text($content, 1);
$content = url_auto_link($content);
}
return $content;
}
답변에 대한 댓글 2개
2014-02-06 (목) 02:59:52
일반 내용으로 사용하면 나오지 않습니다. 여분필드를 활용하시면 가능하시니 참고 바랍니다.
답변을 작성하려면 로그인이 필요합니다.