diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-11-30 10:27:13 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-11-30 10:27:13 +0000 |
commit | 2917261693c0eea6d4593096024398e6d7141be7 (patch) | |
tree | 631fc44b5ac913e5bed2626d5631c8b12cfb6bf1 /includes/file.inc | |
parent | bcb6257b31588fadc5ee00efa16571e5eabf0420 (diff) | |
download | brdo-2917261693c0eea6d4593096024398e6d7141be7.tar.gz brdo-2917261693c0eea6d4593096024398e6d7141be7.tar.bz2 |
- Removed valid_input_check().
Diffstat (limited to 'includes/file.inc')
-rw-r--r-- | includes/file.inc | 12 |
1 files changed, 0 insertions, 12 deletions
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')) { |