Commit 67277062 authored by Dries's avatar Dries
Browse files

- Patch #78807 by Darren: remove stale code.

parent 8fdf7a87
......@@ -228,7 +228,7 @@ function file_check_upload($source = 'upload') {
$file->filemime = $_FILES["edit"]["type"][$source];
// Rename potentially executable files, to help prevent exploits.
if (((substr($file->filemime, 0, 5) == 'text/' || strpos($file->filemime, 'javascript')) && (substr($file->filename, -4) != '.txt')) || preg_match('/\.(php|pl|py|cgi|asp)$/i', $file->filename)) {
if (preg_match('/\.(php|pl|py|cgi|asp|js)$/i', $file->filename) && (substr($file->filename, -4) != '.txt')) {
$file->filemime = 'text/plain';
$file->filepath .= '.txt';
$file->filename .= '.txt';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment