Applied D6LTS critical patch SA-CORE-2018-004

This commit is contained in:
Manuel Cillero 2018-05-08 12:55:40 +02:00
parent 7555bc6a75
commit e9fe735920

View file

@ -590,7 +590,7 @@ function filefield_js($type_name, $field_name, $delta) {
// JSON output.
$GLOBALS['devel_shutdown'] = FALSE;
if (empty($field) || empty($_POST['form_build_id'])) {
if (empty($field) || $field['type'] != 'filefield' || !is_numeric($delta) || empty($_POST['form_build_id'])) {
// Invalid request.
drupal_set_message(t('An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (@size) that this server supports.', array('@size' => format_size(file_upload_max_size()))), 'error');
print drupal_to_js(array('data' => theme('status_messages')));