[fusion-trac] #67: Determine Fusion's handling of relative
paths for MapFiles
Fusion
trac_fusion at osgeo.org
Tue Sep 16 15:07:27 EDT 2008
#67: Determine Fusion's handling of relative paths for MapFiles
-------------------------+--------------------------------------------------
Reporter: jfournier | Owner: madair
Type: enhancement | Status: new
Priority: P1 | Milestone: 2.0
Component: MapServer | Version: 1.0.6
Severity: Critical | Resolution:
Keywords: | External_id:
State: New | Browser: All
Os: All |
-------------------------+--------------------------------------------------
Changes (by pagameba):
* priority: P2 => P1
* type: task => enhancement
* severity: Major => Critical
* milestone: 1.1 => 2.0
Comment:
The code is very dumb, it just uses the path you provide to open the map
file. If relative paths would work at all right now, it would be relative
to LoadMap.php.
I think that a good solution would be to allow setting a value in the
configuration file that sets the root folder for map files and then only
files within that folder will be considered (and the paths would be
relative to that folder).
So we would add the following to config.json:
{
"mapserver":{
"mapfileroot":"/ms4w/apps"
}
}
(ignoring other settings that are in there)
Then LoadMap.php (for MapServer) would be modified to check to see if the
mapfile path is relative or absolute - if relative, then it would append
it to the mapfileroot value. In both cases it would check the final real
path against the mapfileroot to see if the path is valid.
What happens if the mapfileroot value is not set? Do we assume a default?
What about a default relative path (the fusion root directory)? This
makes me think that we should do two things:
1) mapfile relative path is taken from either the mapfileroot if specified
or the fusion directory itself
2) if mapfileroot is specified then the final path is restricted to being
within the mapfileroot.
Comments?
--
Ticket URL: <http://trac.osgeo.org/fusion/ticket/67#comment:1>
Fusion <http://trac.osgeo.org/fusion>
Fusion is a web-mapping application development framework for MapServer and MapGuide OS.
More information about the fusion-trac
mailing list