Branch: Tag:

2013-10-01

2013-10-01 16:02:54 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Configuration: Clear some of the misc state in open_file().

RequestID::clone_me() copies the entirety of id->misc, including
state like the return code for the parsed page, which could cause
the subrequest performed by open_file() to fail. It also polluted
the RXML state for the subrequest with tag definitions etc that
shouldn't be there.

Fixes [bug 6631 (#6631)].

5:   // @appears Configuration   //! A site's main configuration    - constant cvs_version = "$Id: configuration.pike,v 1.555 2004/04/19 16:44:57 mast Exp $"; + constant cvs_version = "$Id$";   #include <module.h>   #include <module_constants.h>   #include <roxen.h>
2087:    else {    Configuration oc = id->conf;    id->not_query = fname; +  +  // Make sure RXML defines don't survive <insert file/>. +  // Fixes [bug 6631] where the return code for the outer +  // RXML scope caused the <insert file/> to fail. +  m_delete(id->misc, "defines"); +  m_delete(id->misc, "error_code"); +     TRY_FIRST_MODULES (file, open_file (fname, mode, id,    internal_get, recurse_count + 1));    fname = id->not_query;