Configuration file upload fails on browsers that include full file path

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • 2.5.31
    • Affects Version/s: None
    • Component/s: UI
    • None
    • Environment:
      Grouper 2.5.29 container
      Windows 10 running Edge (pre-chrome) browser

      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.

       

            Assignee:
            Chris Hyzer (upenn.edu)
            Reporter:
            Ross Wilper (stanford.edu) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: