Uploaded image for project: 'GeoServer'
  1. GEOS-7534

GeoServerPropertyOverrideConfigurer doesn't properly substitute windows paths

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.4, 2.9.1, 2.10-M0
    • Component/s: None
    • Labels:
      None

      Description

      GeoServerPropertyOverrideConfigurer uses replaceAll() method to substitute GEOSERVER_DATA_DIR placeholders with GeoServer data dir path. Problem, the replaceAll() method uses regex instead of literal strings, so when substituting with a windows path this will produce a wrong result.

      For example, if GeoServer data dir path is

      C:\Users\Work\GeoServer\data
      

      and we have a property like this

      jdbc:h2:${GEOSERVER_DATA_DIR}\db
      

      the substitution result will be:

      jdbc:h2:C:UsersWorkGeoServerdata\db
      

      Using replace() method instead of replaceAll() method will produced the expected result:

      jdbc:h2:C:\Users\Work\GeoServer\data\db
      

        Attachments

          Activity

            People

            • Assignee:
              nmco Nuno Oliveira
              Reporter:
              nmco Nuno Oliveira
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: