summaryrefslogtreecommitdiff
path: root/includes/file.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/file.inc')
-rw-r--r--includes/file.inc12
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')) {