--- includes/file.inc	2006/08/14 05:33:21 1.81
+++ includes/file.inc	2006/08/14 21:54:32
@@ -227,13 +227,6 @@ function file_check_upload($source = 'up
 
     $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)) {
-      $file->filemime = 'text/plain';
-      $file->filepath .= '.txt';
-      $file->filename .= '.txt';
-    }
-
     // Move uploaded files from php's upload_tmp_dir to Drupal's file temp.
     // This overcomes open_basedir restrictions for future file operations.
     if (!move_uploaded_file($_FILES["edit"]["tmp_name"][$source], $file->filepath)) {
