[mapserver-commits] r12280 - trunk/mapserver/mapcache/src

svn at osgeo.org svn at osgeo.org
Fri Aug 26 07:13:27 EDT 2011


Author: tbonfort
Date: 2011-08-26 04:13:27 -0700 (Fri, 26 Aug 2011)
New Revision: 12280

Modified:
   trunk/mapserver/mapcache/src/service_tms.c
Log:
add a check in disk cache that the given file cannot traverse through the whole filesystem if ".." is included somewhere (e.g. in user supplied dimensions)
thomas.bonfort | 2011-01-24 17:24:31 +0100 (Mon, 24 Jan 2011)

Modified: trunk/mapserver/mapcache/src/service_tms.c
===================================================================
--- trunk/mapserver/mapcache/src/service_tms.c	2011-08-26 11:13:23 UTC (rev 12279)
+++ trunk/mapserver/mapcache/src/service_tms.c	2011-08-26 11:13:27 UTC (rev 12280)
@@ -92,6 +92,7 @@
          geocache_tileset *tileset = request->tileset;
          geocache_grid *grid = request->grid_link->grid;
          int i;
+         double *extent = (request->grid_link->restricted_extent)?request->grid_link->restricted_extent:request->grid_link->grid->extent;
          const char *title = apr_table_get(tileset->metadata,"title");
          if(!title) {
             title = "no title set, add some in metadata";
@@ -103,9 +104,9 @@
          caps = apr_psprintf(ctx->pool,tms_2,
                request->version, onlineresource, request->version,
                title,abstract, grid->srs,
+               extent[0], extent[1],
+               extent[2], extent[3],
                grid->extent[0], grid->extent[1],
-               grid->extent[2], grid->extent[3],
-               grid->extent[0], grid->extent[1],
                grid->tile_sx, grid->tile_sy,
                tileset->format->mime_type,
                tileset->format->extension



More information about the mapserver-commits mailing list