Merge branch 'cheditor'
This commit is contained in:
@ -77,7 +77,7 @@ run_event('cheditor_photo_upload', $data_dir, $data_url);
|
|||||||
//
|
//
|
||||||
$tempfile = $_FILES['file']['tmp_name'];
|
$tempfile = $_FILES['file']['tmp_name'];
|
||||||
$filename = $_FILES['file']['name'];
|
$filename = $_FILES['file']['name'];
|
||||||
|
$filename_len = strrpos($filename, ".");
|
||||||
$type = substr($filename, strrpos($filename, ".")+1);
|
$type = substr($filename, strrpos($filename, ".")+1);
|
||||||
$found = false;
|
$found = false;
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
@ -89,7 +89,7 @@ switch ($type) {
|
|||||||
$found = true;
|
$found = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($found != true) {
|
if ($found != true || $filename_len != 23) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user