Commit a55196c1 authored by Jeff Trawick's avatar Jeff Trawick
Browse files

Merge 1734817, 1734955, r1734989, from trunk:

mod_include now sets DOCUMENT_ARGS.

* Like DOCUMENT_URI, this is for the SSI document, not for any
  subrequest called for the include directive.
* Like QUERY_STRING, this is just r->args (or empty string if there are
  none), unlike QUERY_STRING_UNESCAPED.

The name of the variable is taken from the Zeus SSI implementation.

Follow-up to r1734817: suexec passes through mod_include's DOCUMENT_ARGS

Follow-up to r1734817: Reorder, mention compatibility

Submitted by: trawick
Reviewed by: jim, ylavic




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1735963 13f79535-47bb-0310-9956-ffa450edef68
parent 83860c23
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
                                                         -*- coding: utf-8 -*-

  *) mod_include: Add variable DOCUMENT_ARGS, with the arguments to the
     request for the SSI document.  [Jeff Trawick]

  *) mod_authz_host: Add a new "forward-dns" authorization type, not relying on
     reverse DNS lookups.  [Fabien]

+0 −8
Original line number Diff line number Diff line
@@ -112,14 +112,6 @@ RELEASE SHOWSTOPPERS:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
  [ start all new proposals below, under PATCHES PROPOSED. ]

  *) DOCUMENT_ARGS, set by mod_include to represent args to SSI document;
     unlike UNESCAPED_QUERY_STRING, not shell-escaped
     trunk patch: r1734817, r1734955, r1734989 (but version compat and CHANGES
                  need to be manipulated)
     2.4.x patch: https://emptyhammock.com/media/downloads/DOCUMENT_ARGS-to-2.4.x.txt
     +1: trawick, jim, ylavic
     ylavic: The second CHANGES entry added in the patch should not be merged...


PATCHES PROPOSED TO BACKPORT FROM TRUNK:
  [ New proposals should be added at the end of the list ]
+17 −4
Original line number Diff line number Diff line
@@ -526,6 +526,16 @@ AddOutputFilter INCLUDES .shtml
      <dt><code>DATE_LOCAL</code></dt>
      <dd>The current date in the local time zone.</dd>

      <dt><code>DOCUMENT_ARGS</code></dt>
      <dd>This variable contains the query string of the active SSI
      document, or the empty string if a query string is not
      included.  For subrequests invoked through the
      <code>include</code> SSI directive, <code>QUERY_STRING</code>
      will represent the query string of the subrequest and
      <code>DOCUMENT_ARGS</code> will represent the query string of
      the SSI document.  (Available in Apache HTTP Server 2.4.19 and
      later.)</dd>

      <dt><code>DOCUMENT_NAME</code></dt>
      <dd>The filename (excluding directories) of the document
      requested by the user.</dd>
@@ -544,10 +554,13 @@ AddOutputFilter INCLUDES .shtml
      the user.</dd>

      <dt><code>QUERY_STRING_UNESCAPED</code></dt>
      <dd>If a query string is present, this variable contains the
      (%-decoded) query string, which is <em>escaped</em> for shell
      usage (special characters like <code>&amp;</code> etc. are
      preceded by backslashes).</dd>
      <dd>If a query string is present in the request for the active
      SSI document, this variable contains the (%-decoded) query
      string, which is <em>escaped</em> for shell usage (special
      characters like <code>&amp;</code> etc. are preceded by
      backslashes).  It is not set if a query string is not
      present.  Use <code>DOCUMENT_ARGS</code> if shell escaping
      is not desired.</dd>
    </dl>
</section>

+1 −0
Original line number Diff line number Diff line
@@ -597,6 +597,7 @@ static void add_include_vars(request_rec *r)
    apr_table_setn(e, "DATE_GMT", LAZY_VALUE);
    apr_table_setn(e, "LAST_MODIFIED", LAZY_VALUE);
    apr_table_setn(e, "DOCUMENT_URI", r->uri);
    apr_table_setn(e, "DOCUMENT_ARGS", r->args ? r->args : "");
    if (r->path_info && *r->path_info) {
        apr_table_setn(e, "DOCUMENT_PATH_INFO", r->path_info);
    }
+1 −0
Original line number Diff line number Diff line
@@ -85,6 +85,7 @@ static const char *const safe_env_lst[] =
    "CONTEXT_PREFIX=",
    "DATE_GMT=",
    "DATE_LOCAL=",
    "DOCUMENT_ARGS=",
    "DOCUMENT_NAME=",
    "DOCUMENT_PATH_INFO=",
    "DOCUMENT_ROOT=",