Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Commit

Permalink
- fixed change language
Browse files Browse the repository at this point in the history
- security update
  • Loading branch information
trippo committed Oct 26, 2016
1 parent 280e7f4 commit 0884d64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions filemanager/dialog.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
$filter='';
}

$extensions='';
$extensions=null;
if (isset($_GET['extensions'])){
$extensions = json_decode(urldecode($_GET['extensions']));
if($extensions){
Expand All @@ -232,7 +232,7 @@
}elseif($_SESSION['RF']['language']){
$languages = include 'lang/languages.php';
if(array_key_exists($lang,$languages)){
$lang = strip_tags($_GET['lang']);
$lang = strip_tags($_SESSION['RF']['language']);
$_SESSION['RF']['language'] = $lang;
}
}
Expand Down Expand Up @@ -265,7 +265,7 @@
'lang' => $lang,
'popup' => $popup,
'crossdomain' => $crossdomain,
'extensions' => urlencode(json_encode($extensions)),
'extensions' => ($extensions) ? urlencode(json_encode($extensions)) : null ,
'field_id' => $field_id,
'relative_url' => $return_relative_url,
'akey' => (isset($_GET['akey']) && $_GET['akey'] != '' ? $_GET['akey'] : 'key')
Expand Down
4 changes: 3 additions & 1 deletion filemanager/upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@

$info = pathinfo($_FILES['file']['name']);
$mime_type = $_FILES['file']['type'];
$mime_type = mime_content_type($_FILES['file']['tmp_name']);
$extension = get_extension_from_mime($mime_type);
if($extension==='' || $extension=='so'){

if($extension=='so'){
$extension = $info['extension'];
}

Expand Down

0 comments on commit 0884d64

Please sign in to comment.