Commit d54ef6db authored by Steven Wittens's avatar Steven Wittens

Rest of #12167 (respect input check bypass permission)

parent b94f9af2
......@@ -399,7 +399,7 @@ 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 (!valid_input_data($data)) {
if (!user_access('bypass input data check') && !valid_input_data($data)) {
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