Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-2836

Configuration file upload fails on browsers that include full file path

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 2.5.31
    • None
    • UI
    • None
    • Grouper 2.5.29 container
      Windows 10 running Edge (pre-chrome) browser

    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.

       

      Attachments

        Activity

          People

            chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
            ross.wilper@at.internet2.edu Ross Wilper (stanford.edu)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: