#803926 by dhthwy: Fixed File field shouldn't allow any file extension to be uploaded when the list of allowed extensions is left blank.

merge-requests/26/head
Angie Byron 2010-06-25 04:36:49 +00:00
parent 6b0f13f03c
commit 84003e47bd
1 changed files with 4 additions and 1 deletions

View File

@ -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(