diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-08-30 09:30:43 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-08-30 09:30:43 +0000 |
commit | 67277062eef15707a17786f8dd797dff4b82a359 (patch) | |
tree | 818dcb5c889cca373ad64c3c3451ad42bb6a6832 | |
parent | 8fdf7a87503c9572fa481e4edc2f913a1385eb48 (diff) | |
download | brdo-67277062eef15707a17786f8dd797dff4b82a359.tar.gz brdo-67277062eef15707a17786f8dd797dff4b82a359.tar.bz2 |
- Patch #78807 by Darren: remove stale code.
-rw-r--r-- | includes/file.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/file.inc b/includes/file.inc index 6ab1d77f8..9649a45ab 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -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'; |