Skip to content

Commit

Permalink
corrected ckeditor fixed upload suport files
Browse files Browse the repository at this point in the history
  • Loading branch information
dleffler committed Dec 12, 2016
1 parent f124244 commit e493e6f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion framework/modules/file/connector/uploader.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
$message = gt("The file is zero length.");
// } else if (($_FILES['upload']["type"] != "image/pjpeg") AND ($_FILES['upload']["type"] != "image/jpeg") AND ($_FILES['upload']["type"] != "image/png")) {
// $message = gt("The image must be in either JPG or PNG format. Please upload a JPG or PNG instead.");
} elseif (preg_match("/([^\w\s\d\-_~,;:\[\]\(\).])|([\.]{2,})/", $_FILES['file']['name'])) {
} elseif (preg_match("/([^\w\s\d\-_~,;:\[\]\(\).])|([\.]{2,})/", $_FILES['upload']['name'])) {
$message = gt("Invalid file name.");
} else if (!is_uploaded_file($_FILES['upload']["tmp_name"])) {
$message = gt("You may be attempting to hack our server.");
Expand Down
2 changes: 1 addition & 1 deletion framework/modules/file/connector/uploader_paste.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
$message = gt("The file is zero length.");
// } else if (($_FILES['upload']["type"] != "image/pjpeg") AND ($_FILES['upload']["type"] != "image/jpeg") AND ($_FILES['upload']["type"] != "image/png")) {
// $message = gt("The image must be in either JPG or PNG format. Please upload a JPG or PNG instead.");
} elseif (preg_match("/([^\w\s\d\-_~,;:\[\]\(\).])|([\.]{2,})/", $_FILES['file']['name'])) {
} elseif (preg_match("/([^\w\s\d\-_~,;:\[\]\(\).])|([\.]{2,})/", $_FILES['upload']['name'])) {
$message = gt("Invalid file name.");
} else {
if (!is_uploaded_file($_FILES['upload']["tmp_name"])) {
Expand Down

0 comments on commit e493e6f

Please sign in to comment.