From 3114ffff719a420f0945ea2e81c6ebe9b70b3fa7 Mon Sep 17 00:00:00 2001 From: ASponch Date: Mon, 29 Jan 2018 11:52:13 +0100 Subject: [PATCH] modified: use video key instead of video id in embed code in order to protect videoid diffusion --- upload/includes/classes/video.class.php | 2 +- upload/includes/functions_video.php | 2 +- upload/player/embed_player.php | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/upload/includes/classes/video.class.php b/upload/includes/classes/video.class.php index b2fefe65..227e98f2 100644 --- a/upload/includes/classes/video.class.php +++ b/upload/includes/classes/video.class.php @@ -1302,7 +1302,7 @@ class CBvideo extends CBCategory if($type=='iframe') { $embed_code = ''; } diff --git a/upload/includes/functions_video.php b/upload/includes/functions_video.php index 37be1b5d..c044e1cf 100644 --- a/upload/includes/functions_video.php +++ b/upload/includes/functions_video.php @@ -1055,7 +1055,7 @@ } } - increment_views_new($vdo['videoid'],'video'); + increment_views_new($vdo['videokey'],'video'); if(userid()) $userquery->increment_watched_vides(userid()); diff --git a/upload/player/embed_player.php b/upload/player/embed_player.php index ecfcf5ac..612e17f9 100644 --- a/upload/player/embed_player.php +++ b/upload/player/embed_player.php @@ -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'];