Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 6.1.1 CE GA2, 6.1.20 EE GA2
-
Fix Version/s: 6.1.X EE, 6.2.0 CE M5
-
Component/s: Dynamic Data Lists, Frameworks, Frameworks > Dynamic Data Mapping
-
Branch Version/s:6.1.x
-
Backported to Branch:Committed
-
Story Points:2
-
Fix Priority:4
-
Similar Issues:
Description
This issue is only reproducible on 6.1.x EE. It will only be reproducible on 6.2.x after LPS-32348 gets resolved.
If the valid file extensions are restricted by the property 'dl.file.extensions', the attempt to upload a file with an allowed extension to a DDL record will still result in FileExtensionException. This is because the method DDMImpl.storeFieldFile is using the field name and not the file name due to it's own logic, but then it invokes a method from the Document Library API that implicitly tries to verify the extension against the list in the property.
Also, the extension check happens on the client side right upon submitting the record, so it would be unnecessary anyway to do it again when uploading the file.
Reproduction steps:
1. Start the portal by setting the property 'dl.file.extensions' in portal-ext.properties to a list of extensions e.g. '.jpg,.gif,.png,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pps,.pdf,.flv,.mp4,.mov,.m4v,.f4v'
2. Go to Control Panel > Dynamic Data Lists > Manage Data Definitions > Add
3. Create 'test data definition' by adding a Text and a File Upload field
4. Add a new Dynamic Data List e.g. 'test DDL' and select 'test data definition' for it's Data Definition
5. Go to home page and add Dynamic Data List Display portlet
6. Click Select List, select 'test DDL' and Save
7. On the portlet click Add Record, fill the Text field and attach a file to the File Upload field that has an extension from the list you specified in step 1, so it should be allowed.
8. You will get a FileExtensionException in the console, and the portlet will also display an error message

PASSED Manual Testing following the steps in the description.
Reproduced on:
Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: 6d4da1e25951791bfe2bfa15f8aec37b5e033c2e.
I will get a FileExtensionException in the console, and the portlet will also display an error message.
Fixed on:
Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: b69dcdfeec063364921af007e457b2cbbded450f.
Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 07820440e75ae47d09fae1e87d98f5af21146f4e.
I can upload the file successfully and no error in the console.