modified: use video key instead of video id in embed code in order to protect videoid diffusion

This commit is contained in:
ASponch 2018-01-29 11:52:13 +01:00
parent c563c69f9b
commit 3114ffff71
3 changed files with 7 additions and 7 deletions

View file

@ -1302,7 +1302,7 @@ class CBvideo extends CBCategory
if($type=='iframe')
{
$embed_code = '<iframe width="'.config('embed_player_width').'" height="'.config('embed_player_height').'" ';
$embed_code .= 'src="'.BASEURL.'/player/embed_player.php?vid='.$vdetails['videoid'].'&width='.
$embed_code .= 'src="'.BASEURL.'/player/embed_player.php?vid='.$vdetails['videokey'].'&width='.
config('embed_player_width').'&height='.config('embed_player_height').
'&autoplay='.config('autoplay_embed').'" frameborder="0" allowfullscreen></iframe>';
}

View file

@ -1055,7 +1055,7 @@
}
}
increment_views_new($vdo['videoid'],'video');
increment_views_new($vdo['videokey'],'video');
if(userid())
$userquery->increment_watched_vides(userid());

View file

@ -15,11 +15,11 @@
define("THIS_PAGE","watch_video");
include("../includes/config.inc.php");
$vid = $_GET['vid'];
//gettin video details
$vdetails = get_video_details($vid);
increment_views_new($vid, 'video');
$vkey = $_GET['vid'];
//gettin video details by key
$vdetails = $cbvid->get_video($vkey);
increment_views_new($vkey, 'video');
$width = @$_GET['width'];
$height = @$_GET['height'];
$autoplay = @$_GET['autoplay'];