Opened 12 years ago

Closed 12 years ago

#842 closed defect (fixed)

WFS: infinite recursion processing schemas.

Reported by: brentrobinson Owned by: brentrobinson
Priority: major Milestone: 3.7.0
Component: WFS Provider Version:
Severity: 2 Keywords: WFS stack overflow
Cc: External ID:

Description

Steps:

provider gets a stack overflow.

Change History (2)

comment:1 by brentrobinson, 12 years ago

Status: newassigned

When the WFS provider retrieves a server's schema, it recursively includes schemas referenced by that schema. Checks are done to ensure that each schema is included once, in order to avoid infinite recursion. This is done by keeping a list of the absolute paths of the schemas included sofar.

The infinite recursion can still happen when a referenced schema's location is a relative path starting with "./". For example, http://schemas.opengis.net/wfs/1.0.0/wfs.xsd references ./WFS-basic.xsd, which in turn, references ./wfs.xsd.

The WFS provider converts relative schema paths to absolute, by prepending the absolute path of the referenced schema. After it includes:

http://schemas.opengis.net/wfs/1.0.0/wfs.xsd

it then includes:

http://schemas.opengis.net/wfs/1.0.0/./WFS-basic.xsd

and then:

http://schemas.opengis.net/wfs/1.0.0/./wfs.xsd

due to the extra "./" in the path, the provider doesn't recognize that it already included this schema, so it continues on including:

http://schemas.opengis.net/wfs/1.0.0/././WFS-basic.xsd http://schemas.opengis.net/wfs/1.0.0/././wfs.xsd http://schemas.opengis.net/wfs/1.0.0/./././WFS-basic.xsd http://schemas.opengis.net/wfs/1.0.0/./././wfs.xsd ...

until there is a stack overflow.

comment:2 by brentrobinson, 12 years ago

Resolution: fixed
Status: assignedclosed

Revision: 6529 Author: brentrobinson Date: 1:54:12 PM, Monday, July 30, 2012 Message: Ticket#842: Remove "./" from schema location uri's.


Modified : /trunk/Providers/WFS/Src/Provider/FdoWfsSchemaMerger.cpp

Note: See TracTickets for help on using tickets.