Opened 13 years ago

Closed 12 years ago

#3755 closed defect (fixed)

WMS GetCapabilities should be completely blocked by default

Reported by: dmorissette Owned by: schpidi
Priority: normal Milestone: 6.0 release
Component: WMS Server Version: unspecified
Severity: normal Keywords:
Cc: schpidi, aboudreault

Description

At the moment, with MS 6.0.0-beta1, a WMS GetCapabilities returns a response with an empty layers list if ows_enable_request is not set (the default in 6.x).

The correct behavior in this case would be to either skip the WMS handler in msOWSDispatch(), or to produce an exception.

Change History (11)

comment:1 by Schpidi, 13 years ago

Added some test cases in msautotest/wxs/ows_disable.map in r11258.

comment:2 by aboudreault, 13 years ago

Daniel, this would implies to check all the ows/wms_enable_request metadata (map and layer levels) to see if there is at least one layer with the GetCapabilities enabled. If we do this for the GetCapabilities, I suppose we should do it for all other requests? This is of course an extra lookup. Is this what we want?

comment:3 by aboudreault, 13 years ago

Fixed and committed in r11338. I've also committed a fix for OWS GetCapabilities requests to report only enabled requests in r11342 and added expected result xml files in msautotest for ows_disable.map in r11339.

comment:4 by aboudreault, 13 years ago

Resolution: fixed
Status: newclosed

comment:5 by schpidi, 12 years ago

Resolution: fixed
Status: closedreopened

I think a valid GetCapabilities response without "layers" element should be returned in case GetCapabilities is globally enabled in ows/wms_enable_request metadata but no layers are enabled.

This is valid according to the WMS 1.3 schemas: <element ref="wms:Layer" minOccurs="0"/>.

If there are no objections I'll take care of it.

comment:6 by schpidi, 12 years ago

Owner: changed from aboudreault to schpidi
Status: reopenednew

in reply to:  5 ; comment:7 by schpidi, 12 years ago

Btw. this applies also to WCS and probably WFS.

comment:8 by schpidi, 12 years ago

Cc: aboudreault added

in reply to:  5 ; comment:9 by schpidi, 12 years ago

Committed changes for WMS GetCapabilities response with an empty list of layers with r12926.

Added some tests with r12927.

in reply to:  9 comment:10 by schpidi, 12 years ago

Oops, sorry for the large commit. Its mainly only indentation changes due to the if around the top-level layer.

in reply to:  7 comment:11 by schpidi, 12 years ago

Resolution: fixed
Status: newclosed

Added ticket for #4140 WCS thus closing this one.

Note: See TracTickets for help on using tickets.