Commit 3e36c786 authored by Steven Wittens's avatar Steven Wittens

#12167: Respect 'bypass input data check' permission in file.inc.

parent f69437de
......@@ -355,7 +355,7 @@ function file_save_upload($source, $dest = 0, $replace = FILE_EXISTS_RENAME) {
}
}
if (!valid_input_data($file)) {
if (!user_access('bypass input data check') && !valid_input_data($file)) {
watchdog('error', t('Possible exploit abuse: invalid data.'));
drupal_set_message(t('File upload failed: invalid data.'), 'error');
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment