modified : file writing and mysql vulnerabilities removed
This commit is contained in:
parent
88eeb41e3f
commit
c207197593
2 changed files with 13 additions and 3 deletions
|
@ -136,8 +136,18 @@ switch($mode)
|
|||
$config_for_mp4 = $Cbucket->configs['stay_mp4'];
|
||||
$ffmpegpath = $Cbucket->configs['ffmpegpath'];
|
||||
$extension = getExt( $_FILES['Filedata']['name']);
|
||||
/*$raw_content_type = mime_content_type($_FILES['Filedata']['tmp_name']);
|
||||
$content_type = substr($raw_content_type, 0,strpos($raw_content_type, '/'));*/
|
||||
|
||||
|
||||
$raw_content_type = mime_content_type($_FILES['Filedata']['tmp_name']);
|
||||
$content_type = substr($raw_content_type, 0,strpos($raw_content_type, '/'));
|
||||
|
||||
if ( $content_type != 'video') {
|
||||
echo json_encode(array("status"=>"400","err"=>"Invalid Content"));
|
||||
exit();
|
||||
}
|
||||
|
||||
pex($content_type,true);
|
||||
|
||||
$types = strtolower(config('allowed_types'));
|
||||
$supported_extensions = explode(',', $types);
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ define("PARENT_PAGE",'collections');
|
|||
require 'includes/config.inc.php';
|
||||
$pages->page_redir();
|
||||
|
||||
$c = mysql_clean($_GET['cid']);
|
||||
$c = mysql_clean((int)$_GET['cid']);
|
||||
$type = mysql_clean($_GET['type']);
|
||||
|
||||
$page = mysql_clean($_GET['page']);
|
||||
|
|
Loading…
Add table
Reference in a new issue