#803926 by dhthwy: Fixed File field shouldn't allow any file extension to be uploaded when the list of allowed extensions is left blank.
parent
6b0f13f03c
commit
84003e47bd
|
@ -122,9 +122,12 @@ function file_field_instance_settings_form($field, $instance) {
|
|||
'#type' => 'textfield',
|
||||
'#title' => t('Allowed file extensions'),
|
||||
'#default_value' => $extensions,
|
||||
'#description' => t('Separate extensions with a space or comma and do not include the leading dot. Leaving this blank will allow users to upload a file with any extension.'),
|
||||
'#description' => t('Separate extensions with a space or comma and do not include the leading dot.'),
|
||||
'#element_validate' => array('_file_generic_settings_extensions'),
|
||||
'#weight' => 1,
|
||||
// By making this field required, we prevent a potential security issue
|
||||
// that would allow files of any type to be uploaded.
|
||||
'#required' => TRUE,
|
||||
);
|
||||
|
||||
$form['max_filesize'] = array(
|
||||
|
|
Loading…
Reference in New Issue