Skip to content
Snippets Groups Projects
Commit 3e36c786 authored by Steven Wittens's avatar Steven Wittens
Browse files

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

parent f69437de
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment