Details
-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
6.3.4, 6.4.3
-
None
-
2
-
Severity 3 - Minor
-
Description
Summary
Confluence allows users to select a non-Word document for the "Import Word Document" feature. This results in a NullPointerException being presented on screen instead of being handled more gracefully.
Steps to reproduce
- Navigate to any Confluence page
- Navigate to "..." > Import Word Document
- Select a non-Word document, such as an image file, and click the "Import" button
Expected behavior
- Confluence will not allow the Import button to be pressed when the selected document is not a valid Word document
- OR, the import will proceed initially, but when an error is encountered, display a user-friendly error that the document is not a Word document
Actual behavior
An "Oops - an error has occurred" screen is shown, and a large stacktrace is presented to the user:
Cause java.lang.NullPointerException at com.benryan.webwork.WordImportAction.resolveTitleConflicts(WordImportAction.java:623) Stack Trace:[hide] java.lang.NullPointerException at com.benryan.webwork.WordImportAction.resolveTitleConflicts(WordImportAction.java:623) at com.benryan.webwork.WordImportAction.doFileImport(WordImportAction.java:361) at com.benryan.webwork.WordImportAction.doExecuteFileImport(WordImportAction.java:200) at com.benryan.webwork.WordImportAction.executeFileImport(WordImportAction.java:170) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) ...