Details
Description
I am attempting to import a configuration file from a Windows machine ( C:\Code\GrouperSettings\subject.properties ) via the form and grouper (2.5.29) is responding with "File name must be one of the following: grouper.cache.properties, grouper.client.properties, grouper-loader.properties, grouper.properties, grouper-ui.properties, grouper-ws.properties, subject.properties"
Fiddler for Windows shows the Form submission contents as:
Content-Disposition: form-data; name="importConfigFile"; filename="C:\Code\GrouperSettings\subject.properties" Content-Type: application/octet-stream |
<file> |
It appears that the code is assuming that the browser will always send the base file name, but the documentation for org.apache.commons.fileupload.FileItem states:
String getName()
Returns the original filename in the client's filesystem, as provided by the browser (or other client software). In most cases, this will be the base file name, without path information. However, some clients, such as the Opera browser, do include path information.
Returns:
The original filename in the client's filesystem.
Source Reference:
UiV2Configure.java line 680
ConfigFileName.java line 346
Browsers Tested:
Windows 10 (1809) Edge - Sent full file path and Failed
Google Chrome 83.0.4103.61 - Sent base file path and succeeded.