From 2917261693c0eea6d4593096024398e6d7141be7 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 30 Nov 2005 10:27:13 +0000 Subject: - Removed valid_input_check(). --- includes/file.inc | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'includes/file.inc') diff --git a/includes/file.inc b/includes/file.inc index 55f7825d5..dca300079 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -391,12 +391,6 @@ function file_save_upload($source, $dest = 0, $replace = FILE_EXISTS_RENAME) { } } - if (!user_access('bypass input data check') && !valid_input_data($file)) { - watchdog('security', t('The file %file has not been saved, because it may contain a possible attempt to exploit or abuse this system.', array('%file' => theme('placeholder', $source))), WATCHDOG_WARNING); - drupal_set_message(t('The file %file has not been saved, because it contains invalid data.', array('%file' => theme('placeholder', $source))), 'error'); - return 0; - } - // Check for file upload errors. switch ($file->error) { case 0: // UPLOAD_ERR_OK: File uploaded successfully @@ -435,12 +429,6 @@ function file_save_upload($source, $dest = 0, $replace = FILE_EXISTS_RENAME) { * @return A string containing the resulting filename or 0 on error */ function file_save_data($data, $dest, $replace = FILE_EXISTS_RENAME) { - if (!user_access('bypass input data check') && !valid_input_data($data)) { - watchdog('security', t('The file has not been saved, because it may contain a possible attempt to exploit or abuse this system.'), WATCHDOG_WARNING); - drupal_set_message(t('The file has not been saved, because it contains invalid data.'), 'error'); - return 0; - } - $temp = file_directory_temp(); $file = tempnam($temp, 'file'); if (!$fp = fopen($file, 'wb')) { -- cgit v1.2.3