Commit 84003e47 authored by webchick's avatar webchick
Browse files

#803926 by dhthwy: Fixed File field shouldn't allow any file extension to be...

#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 6b0f13f0
...@@ -122,9 +122,12 @@ function file_field_instance_settings_form($field, $instance) { ...@@ -122,9 +122,12 @@ function file_field_instance_settings_form($field, $instance) {
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Allowed file extensions'), '#title' => t('Allowed file extensions'),
'#default_value' => $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'), '#element_validate' => array('_file_generic_settings_extensions'),
'#weight' => 1, '#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( $form['max_filesize'] = array(
......
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