Playa82
18.03.2008, 17:36
Hallo Leute, ich hoffe ich frage hier richtig...
habe folgendes Problem, im folgendem script ist ein xss (cross-site-scripting) fehler drinnen. ich kann ihn leider nicht finden. vielleicht kann mir jemand helfen:
<?php
$videos = $phpYoutube->videos_listbytag($search,$pages,12);
$navbits = array(
"vBTube.php?" => $vbphrase['vBTube_title']
);
$navbits[] = $vbphrase['vBTube_search'].': '.$search;
$navbits = construct_navbits($navbits);
$sect = "<div style=\"float:right;\">$search</div>".$vbphrase['vBTube_search'].':';
$totalpages = $videos[total] / 12;
$totalpages = round($totalpages,0);
$pages = $_GET[page];
if (!$pages) { $pages = 1; }
if (!$videos) {
eval('$vBTube_videos .= "' . fetch_template('vBTube_none') . '";');
} else {
$i=0;
foreach ($videos['video'] as $video) {
if($i <12 AND $video[id]!=''){
$video[stitle] = utf8_decode($video[title]);
$video[rate] = rating($video[rating_avg]);
$video[view_count] = vb_number_format($video[view_count]);
eval('$vBTube_bits .= "' . fetch_template('vBTube_videobit') . '";');
$i++;
if ($i % 3 == 0) { eval('$vBTube_bits .= "' . fetch_template('vBTube_blankbit') . '";'); } }
}
if ($pages >= 1) {
$next = $pages + 1;
$previous = $pages - 1;
if ($pages != 1) { $pre = ' <b>«</b> <a href= htmlspecialchars("vBTube.php?do=search&search=)'.$search.'&page='.$previous.'&per_page=12">previous</a>'; }
$page = $pages;
$ipage = 5;
if ($ipage > 1) {
for($z=-4; $z<$ipage; $z++) {
$tmp = $page+$z;
if ($tmp > 0 && $tmp <= $totalpages) {
if ($tmp == $page)
$cur .= ' <strong>'.$tmp.'</strong>';
else
$cur .= ' <a href= htmlspecialchars("vBTube.php?do=search&search=)'.$search.'&page='.$tmp.'&per_page=12" >'.$tmp.'</a>';
}
}
}
if ($pages < $totalpages) { $nex = ' <a href= htmlspecialchars("vBTube.php?do=search&search=)'.$search.'&page='.$next.'$per_page=12" >next</a> <b>»</b> '; }
eval('$vBTube_videos .= "' . fetch_template('vBTube_videos') . '";');
}
}
?>
Vielen Dank für die Hilfe im Vorraus !!!
habe folgendes Problem, im folgendem script ist ein xss (cross-site-scripting) fehler drinnen. ich kann ihn leider nicht finden. vielleicht kann mir jemand helfen:
<?php
$videos = $phpYoutube->videos_listbytag($search,$pages,12);
$navbits = array(
"vBTube.php?" => $vbphrase['vBTube_title']
);
$navbits[] = $vbphrase['vBTube_search'].': '.$search;
$navbits = construct_navbits($navbits);
$sect = "<div style=\"float:right;\">$search</div>".$vbphrase['vBTube_search'].':';
$totalpages = $videos[total] / 12;
$totalpages = round($totalpages,0);
$pages = $_GET[page];
if (!$pages) { $pages = 1; }
if (!$videos) {
eval('$vBTube_videos .= "' . fetch_template('vBTube_none') . '";');
} else {
$i=0;
foreach ($videos['video'] as $video) {
if($i <12 AND $video[id]!=''){
$video[stitle] = utf8_decode($video[title]);
$video[rate] = rating($video[rating_avg]);
$video[view_count] = vb_number_format($video[view_count]);
eval('$vBTube_bits .= "' . fetch_template('vBTube_videobit') . '";');
$i++;
if ($i % 3 == 0) { eval('$vBTube_bits .= "' . fetch_template('vBTube_blankbit') . '";'); } }
}
if ($pages >= 1) {
$next = $pages + 1;
$previous = $pages - 1;
if ($pages != 1) { $pre = ' <b>«</b> <a href= htmlspecialchars("vBTube.php?do=search&search=)'.$search.'&page='.$previous.'&per_page=12">previous</a>'; }
$page = $pages;
$ipage = 5;
if ($ipage > 1) {
for($z=-4; $z<$ipage; $z++) {
$tmp = $page+$z;
if ($tmp > 0 && $tmp <= $totalpages) {
if ($tmp == $page)
$cur .= ' <strong>'.$tmp.'</strong>';
else
$cur .= ' <a href= htmlspecialchars("vBTube.php?do=search&search=)'.$search.'&page='.$tmp.'&per_page=12" >'.$tmp.'</a>';
}
}
}
if ($pages < $totalpages) { $nex = ' <a href= htmlspecialchars("vBTube.php?do=search&search=)'.$search.'&page='.$next.'$per_page=12" >next</a> <b>»</b> '; }
eval('$vBTube_videos .= "' . fetch_template('vBTube_videos') . '";');
}
}
?>
Vielen Dank für die Hilfe im Vorraus !!!